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; }
In reply to Re^3: Imager: Gateway Timeout
by Anonymous Monk
in thread Imager: Gateway Timeout
by cristofayre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |