Alas, the module you mention is for GIF's. I'm working on JPG.

Image::ParseGIF would be used to present the progress bar, which is a "deanimated" GIF, not for parsing your original image. Click the given link, then click "browse", then click "examples" for a free progress bar GIF and some example scripts. It would go something like this:

for (my $p=0; $p<@pics; $p++){ $img=Imager->new(); # create empty image my $gif = Image::ParseGIF->("progress.gif") or die "failed to parse: $@\n"; $gif->print_header; $gif->print_percent(0.00); $img->read(file=>$baseURL.$type.'/'.$pics[$p],type=>'jpeg') or die $img->errstr(); my $med = $img->copy(); my $thumb = $img->copy(); $med = $img->scale(xpixels=>750);# sets width to 750px $med->write(file=>$baseURL.$type.'/medium/'.$pics[$p]) or die $image->errstr; # Write out image $gif->print_percent(0.10); # 10% complete $thumb = $img->scale(ypixels=>150);# sets the height to 150px $thumb->write(file=>$baseURL.$type.'/thumbs/'.$pics[$p]) or die $image->errstr; # Write out image $gif->print_percent(0.25); # 25% complete my $rot90 = $img->rotate(degrees=>-90); $rot90->write(file=>$baseURL.$type.'/upright/'.$pics[$p]) or die $image->errstr; # Write out image $gif->print_percent(0.70); # 70% complete my @pic=split(/\./,$pics[$p]); # splits filename at dot [filename][j +pg] $newDat.=$pic[0].'|'; # Used in a latter part of program $gif->print_percent(1.00); # done! $gif->print_trailer; }
  • https://metacpan.org/source/BENL/Image-ParseGIF-0.2/examples
  • https://fastapi.metacpan.org/source/BENL/Image-ParseGIF-0.2/examples/progressbar.gif

    In reply to Re^3: Imager: Gateway Timeout by Anonymous Monk
    in thread Imager: Gateway Timeout by cristofayre

    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.