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

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.