G'day mldvx4,

As I'm not a user of Image::Magick, I left responses to those with more knowledge; however, I see after two days you still have no resolution, so here's some suggestions.

Image::Magick has minimal documentation and points to "PerlMagick Image API for Perl". That appears to be rather dated ("Copyright © 1999") and has Perl code of a similar vintage. It has various issues such as no I/O exception handling and use of a package variable for a filehandle. It looks like your posted code is based on this.

I'd probably write it more like this:

#!/usr/bin/perl use strict; use warnings; use autodie; # for I/O exception handling use Image::Magick; my $svg_filename = '/path/to/some.svg'; my $image = Image::Magick::->new(); open my $fh, '<', $svg_filename; my $err = $image->Read(file => $fh); if ($err) { print "Error b: $err\n"; exit 1; } close $fh; # moved after any code related to $fh print "OK\n"; exit 0;

You said: "I gave it a try and switched from using a file handle to using just a file name ...". I don't know how you implemented that in code; I've used both a filehandle ($fh) and a filename ($svg_filename).

Do note that is untested code: I don't have Image::Magick installed.

— Ken


In reply to Re: Image::Magick - Exception 435: unable to open file `Image::Magick::Q16' @ error/Q16.xs/XS_Image__Magick__Q16_Read/13529 by kcott
in thread Image::Magick - Exception 435: unable to open file `Image::Magick::Q16' @ error/Q16.xs/XS_Image__Magick__Q16_Read/13529 by mldvx4

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.