Re: howto use GdkPixbuf::new_from_data() ?

From: Date: Thu, 23 Oct 2003 19:24:26 +0000
Subject: Re: howto use GdkPixbuf::new_from_data() ?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3984@lists.php.net to get a copy of this message
After some different tryes I've finaly found :) > I'm trying to use GdkPixbuf::new_from_data(), > but I don't find what is wrong in my script. > Has the image data to be convert in a special format? imagick_convert($handle, 'RGB') works. (and i found PPM and PNM work fine too) In fact it was writen in the doc but i did not understand RGB was a real format, because for me PNG or JPG are also RGB images... > Or perhaps the problem is from the rowstride? > I don't understand what "specifies distance in bytes between successive > image rows" means, so I've tryed to put it the same than the width or the > height, but no success... taken a 256x512 image i found 1536 was working, I have tryed a lot of combinaisons: all 2^X and operation on width and heigh (256 * 8 - 512) (256+512 * 2) and finaly found the good value: $rowstride = $width * 3; no need to take care of the height :)))

« previous php.gtk.general (#3984) next »