Hello. I have some difficulties with manipulation of pixels in the GdkPixbuf data buffer. I use the following loop to iterate thought each pixel:
----------------------------------- n_channels = gdk_pixbuf_get_n_channels(pixbuf); guchar *pixel; guchar *data = gdk_pixbuf_get_pixels(pixbuf); for (i = 0; i < width*height; i++) { pixel = buffer + i * n_channels; pixel[0] = 100; /* Red channel */ pixel[1] = 100; /* Green channel */ pixel[2] = 100; /* Blue channel */ pixel[3] = 100; /* Alpha channel */ } ----------------------------------- Is this the right way to handle a RGBA buffer? Greets, Luka _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list