in reply to Image::Magick - Exception 435: unable to open file `Image::Magick::Q16' @ error/Q16.xs/XS_Image__Magick__Q16_Read/13529

Your script gives same error under Win32 and Strawberry; I installed latest IM 7.1.1-11 and then Image::Magick. Though they specifically warn:

Note, reading from or writing to a Perl filehandle may fail under Windows

maybe this plague has spread to Linux lately.

Reading from file (providing a filename) works. And this also works:

my $i = Image::Magick-> new( magick => 'svg' ); $i-> BlobToImage( do { undef $/; <DATA> } ); $i-> Write( 'junk.png' ); # to test
  • Comment on Re: Image::Magick - Exception 435: unable to open file `Image::Magick::Q16' @ error/Q16.xs/XS_Image__Magick__Q16_Read/13529
  • Download Code

Replies are listed 'Best First'.
Re^2: Image::Magick - Exception 435: unable to open file `Image::Magick::Q16' @ error/Q16.xs/XS_Image__Magick__Q16_Read/13529
by mldvx4 (Hermit) on Jun 08, 2023 at 11:25 UTC

    Thanks. I gave it a try and switched from using a file handle to using just a file name and still get an an error, albeit a different one:

    Error b: Exception 430: unable to open file '/tmp/magick-K306MFDJ8ArD4Ytnu0O7O3MOC9CghbHa': No such file or directory @ error/constitute.c/ReadImage/785

    I'm not creating any temporary files there, so it must be the module which is trying to do that. It looks like the temporary file vanishes before it is used.