in reply to Howto convert Image::Grab jpg object to Image::Magick object???

If I understand the Image::Grab docs correctly, it just returns the image as binary data. According to the docs, Image::Magick supports reading filehandles, which you could use with an in-memory filehandle (open), as well as reading data in memory directly:

my $image = Image::Magick->new(magick=>'jpg'); open my $fh, '<', \$imgdata or die $!; $image->Read(file=>$fh); # - or - $image->BlobToImage($imgdata);

(untested)

  • Comment on Re: Howto convert Image::Grab jpg object to Image::Magick object???
  • Download Code