Re: Rgba to pixbuf
- From: Kevin Ryde <user42 zip com au>
- To: Mario Kemper <mario kemper googlemail com>
- Cc: "gtk-perl-list gnome org" <gtk-perl-list gnome org>
- Subject: Re: Rgba to pixbuf
- Date: Tue, 15 Feb 2011 07:40:37 +1100
Mario Kemper <mario kemper googlemail com> writes:
how do I convert rgba information into a pixbuf? I have an array with
rgba values (0-255) for each pixel. How do I need to pack those
information in order to use Gtk2::Gdk::Pixbuf->new_from_data?
Bytes in a string, eg. "\377\0\0" for a red pixel. 8 bits per component
is all that's supported.
There's no size check as yet on the width x height vs the length of the
byte string you supply, so be careful with that, and also make sure it's
a byte string not a utf8 wide-char string thingie.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]