Re: GdkPixbuf pixel data weirdness
- From: "Chris Garrett" <garrett91 hotmail com>
- To: martine cs washington edu
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GdkPixbuf pixel data weirdness
- Date: Mon, 10 Mar 2003 08:32:40 +0000
Thanks Evan!
It was a rowstride problem. I did not realise that the width of each row
was not equal to the number of pixels * 3 (in 8bpp mode) or 4 if an alpha
channel was added.
Why is this? What are the padding pixels used for at the end of each row? -
is it so that the start of the next row is word aligned? I could not find
anything in the docs apart from the gdk_pixbuf_get_rowstride() function
call, which simply defines rowstride without an explanation.
Best regards,
Chris.
From: Evan Martin <martine cs washington edu>
To: Chris Garrett <garrett91 hotmail com>
CC: gtk-app-devel-list gnome org
Subject: Re: GdkPixbuf pixel data weirdness
Date: Sun, 9 Mar 2003 19:04:43 -0800
On Sun, Mar 09, 2003 at 09:31:38PM +0000, Chris Garrett wrote:
> I changed the size of the pixbuf and things went pearshaped. When the
> width of the pixbuf is a multiple of 4, it works (20, 24, 28...). With
any
> other width, its as though I have offset the data somehow - the pixbuf
> appears striped and the border comes in diagonally.
Looks like a rowstride problem. Look for "rowstride" in the docs.
--
Evan Martin
martine cs washington edu
http://neugierig.org
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://messenger.msn.co.uk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]