[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Acquring RGB values from GdkPixbuf
- From: Christopher Anderson <sidewinder asu gmail com>
- To: Michal Porzuczek <mporzuczek gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Acquring RGB values from GdkPixbuf
- Date: Wed, 15 Jun 2005 13:06:10 -0700
To convert to greyscale, just look through each pixel, apply the
transformation you mentioned, and then set all three components to
that value:
value = 0.299*Red+0.587*Green+0.114*Blue;
Red = value;
Green = value;
Blue = value;
Chris
On 6/15/05, Christopher Anderson <sidewinder asu gmail com> wrote:
> Oh hey, I just thought of something. Are you treating your red, green,
> and blue values as if they were on a scale of 0 to 255? This is what I
> expected too, but it turns out I think they are on a scale of 0 to
> 65535. So you need to divide them by 256 in order to get values you
> are used to. Not sure if this helps....
>
> Chris
>
> On 6/15/05, Michal Porzuczek <mporzuczek gmail com> wrote:
> > On 6/15/05, Christopher Anderson <sidewinder asu gmail com> wrote:
> > > I'm wondering what would happen if you converted the image to
> > > grayscale and then displayed it.....
> > >
> > > Chris
> >
> > how would I convert it?
> >
> > Michal
> >
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]