http://qs321.pair.com?node_id=698981

renegadex has asked for the wisdom of the Perl Monks concerning the following question:

Hi! i have this code:
use Gtk2 '-init'; use Image::Magick; my $magick = Image::Magick->new; $magick->Read('pictures/ian.jpg'); $magick->Set(magick=>'xpm'); my $blob = $magick->ImageToBlob(); $pixbuf = Gtk2::Gdk::Pixbuf->new_from_xpm_data ($blob); i get this error: GdkPixbuf-WARNING **: Inline XPM data is broken: Invalid XPM header at + tk-photo.pl line 9.
i want to put the picture loaded by imagemagick into memory, then the memory is read by a gdk pixbuf. also, if my picture is big (2000x2000 pixels) i think it would be very slow to convert it into xpm format... any other ideas to get image data from image magick using gdk pixbuf without writing to disk. tnx!