pstone has asked for the wisdom of the Perl Monks concerning the following question:
$newimage->copyMerge($watermark, 30, 165, 0, 0, 350, 80, 15);
$maxtotal = 30;
$totalnum = 0;
open (xx,"<$cascade");
@totalnum = <xx>;
close (xx);
$totalnum = @totalnum[0];
$totalnum ++;
if ($totalnum > $maxtotal) {
$totalnum = 0;
}
open (xx, ">$cascade") or die("Cannot open file for writing");
print xx "$totalnum\n";
close (xx);
$temppic = "/home/u4/dat3/html/dsa/temppics/$totalnum.gif";
open(PICTURE,">$temppic") or die("Cannot open file for writing");
flock(PICTURE, LOCK_EX);
binmode PICTURE;
print PICTURE $newimage->gif;
close PICTURE;
print "<img src=\"/dsa/temppics/$totalnum.gif\" width=\"400\">
\n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to wait until GD Image it written, then continue
by jethro (Monsignor) on Jan 15, 2009 at 16:34 UTC | |
by pstone (Initiate) on Jan 15, 2009 at 16:48 UTC | |
by andye (Curate) on Jan 15, 2009 at 16:53 UTC | |
by shmem (Chancellor) on Jan 15, 2009 at 17:00 UTC | |
by pstone (Initiate) on Jan 15, 2009 at 18:22 UTC | |
by mr_mischief (Monsignor) on Jan 15, 2009 at 16:54 UTC |