I've been fighting with this for a few hours now, and I'm stuck. I've reread docs, but can't really find anything relevant to this error from Image::Magick::Read:
Exception 450: Empty input file (/var/tmp/magic81OnytHVZvna2f.tmp)

I'm trying to use an uploaded image, resize if needed, and save to a new directory. Earlier, I adapted the code to not depend on CGI's  upload method because i wasn't getting anywhere with it ....

so here's the code in question:

my $thumb = Image::Magick->new(); open( THUMBFILE, $tmpName ) or die "Can't open tmpImg $tmpName: $ +! \n";; my $filesRead = $thumb->Read( file => \*THUMBFILE ); close THUMBFILE; print STDERR "Read: $filesRead files \n"; my ( $height, $width ) = $thumb->Get( 'height', 'width' );
if the files weren't where i say it is via  $tmpName , the OPEN statement should die. and i've verified on the filesystem, and it's there, alright, and ~400K.

without the GLOB ref, strict complains that barewords aren't allowed.

the location reference in the error isn't the same as the file location, but i presume it should be different because of the OPEN statement ....

i'm willing to entertain just about any possiblity, from a b0rked Image::Magick/ Perl::Magick install to .... but how would i check for a b0rked install?


In reply to Image::Magick woes by geektron

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.