Re: gdk-pixbuf
- From: "Dov Grobgeld" <dov grobgeld gmail com>
- To: "frederico schardong" <frede sch gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gdk-pixbuf
- Date: Thu, 18 Dec 2008 23:53:19 +0200
Just loop over the pixels and calculate a gray level through a linear
combination of R, G, and B. For example ppmtopgm uses:
grey = .299 r + .587 g + .114 b
Then assign the resulting gray to the red, green, and blue components, and
voila! You've got yourself a gray scale image.
See my previous post for an example of how to loop over a GdkPixbuf.
Regards,
Dov
2008/12/18 frederico schardong <frede sch gmail com>
I need some API, which has the power to transform any RGB image to
grayscale (8-bit) and I can map the image, creating a vast array[height in
pixels][width in pixels] in which each cell has a value from 0 to 255,
corresponding to the values of the pixels.
With gdk-pixbuf can I do that?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]