|
|
 Jon Ezrin - 2010-04-21 03:46:36 - In reply to message 10 from johno dread
Johno,
I tried your recent suggestions and still get the errors. The php.net page for imagecreatefromjpeg has many user contributed notes about errors caused by memory limits, photos taken with Canon PowerShot cameras, php configurations, etc. Perhaps one of those is the cause of problems, not the script.
 johno dread - 2010-04-21 04:00:41 - In reply to message 9 from davedee
davedee,
Also, replace the line
$sources[] = imagecreatefromjpeg($file);
with:
$sources[] = imagecreatefromjpeg($this->dir."/".$file);
 davedee - 2010-04-21 05:52:43 - In reply to message 12 from johno dread
Cheers Johno, thats fixed it. thanks again for your prompt attention to this issue.
 Jon Ezrin - 2010-04-21 11:02:28 - In reply to message 13 from davedee
I'm no longer getting errors but here's an example of my output:
ÿØÿà�JFIF������ÿþ�;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75 ÿÛ�C� $.' ",#(7),01444'9=82<.342ÿÛ�C 2
Suggestions?
 johno dread - 2010-04-21 11:53:21 - In reply to message 14 from Jon Ezrin
Jon,
You might be using Mozilla FF. In this case the browser is not converting the output correctly. Change your example or testfile file as follows:
$outfile = "/mosaic.jpg";
//$outfile = null;
Run the script (or refresh our browser) then go to the root directory eg c:/wamp/www and you should see the resulting image as mosaic.php
 johno dread - 2010-04-21 12:01:13 - In reply to message 14 from Jon Ezrin
Jon,
Also add this line to your your example or test file:
$res = new buildMosaic($dir,$outfile,$quality);
/******/header('Content-type: image/jpeg');
$res->makeMos();
 Jon Ezrin - 2010-04-22 03:09:04 - In reply to message 16 from johno dread
That did it! Thank you.
|