Finally managed to get things to work. It was via a "keep alive" command that sends data back to the browser every now and then to say "I'm still here ..." I don't profess to know HOW it works ... but it does
I also used an option called "qtype" which allows 'normal' - the default for high quality, or 'preview' for lower quality (but =I= can't see the difference. Apparentely, the former is done via a 'filter' whilst the latter is via a pixel 'near neighbour' (???)
Now just got to master how to place a full size watermark over the medium images. Something for Christmas morn !
$| = 1; # set autoflush sub processPics(){ $newDat=''; # read image dir to set @pics array for (my $p=0; $p<@pics; $p++){ print "$pics[$p]<br>"; $img->read(file=>$baseURL.$type.'/'.$pics[$p],type=>'jpeg') or di +e $img->errstr(); $img->copy()->scale(xpixels=>750, qtype=>'preview')->write(file=>$ +baseURL.$type.'/medium/'.$pics[$p]) or die $image->errstr; # Write ou +t an image as medium $img->scale(ypixels=>150, qtype=>'preview')->write(file=>$baseURL. +$type.'/thumbs/'.$pics[$p]) or die $image->errstr; # Resizes the medi +um before write out as thumbs my $rot90 = $img->rotate(degrees=>-90); $rot90->write(file=>$baseURL.$type.'/upright/'.$pics[$p]) or die $ +image->errstr; # Write out an image as medium my @pic=split(/\./,$pics[$p]); $newDat.=$pic[0].'|'; The dat data is stored as one continuous +string separated with pipe (ie "amazing|beaver|biggus") } unless ($_ % 10){ print "<br>" } }
The magic is via 'autoflush' and the 'unless' entry. (As I say, no idea what "$_ % 10" does ... but it prints data to browser screen every few seconds or so)
In reply to Re: Imager: Gateway Timeout
by cristofayre
in thread Imager: Gateway Timeout
by cristofayre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |