Re: Rgba to pixbuf

2011-02-15 Thread Mario Kemper
Thanks, Kevin. I tried to concatenate the strings before, but I did not change the rowstride parameter. It is working great now. Am Dienstag, den 15.02.2011, 08:52 +1100 schrieb Kevin Ryde: Mario Kemper mario.kem...@googlemail.com writes: Is there any way to 'pack' all rgba values at once

Re: Rgba to pixbuf

2011-02-15 Thread zentara
On Mon, 14 Feb 2011 20:40:21 +0100 Mario Kemper mario.kem...@googlemail.com wrote: Hi all, 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? Thanks.

Re: Rgba to pixbuf

2011-02-14 Thread Kevin Ryde
Mario Kemper mario.kem...@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.

Re: Rgba to pixbuf

2011-02-14 Thread Mario Kemper
Thanks, it is working. I reused some of your code: http://cpansearch.perl.org/src/KRYDE/Image-Base-Gtk2-5/lib/Image/Base/Gtk2/Gdk/Pixbuf.pm Currently my code looks like this: my $pixbuf = Gtk2::Gdk::Pixbuf-new('rgb',1,8,$width,$height); for(iterate x-coordinate){ for(iterate y-coordinate){