PHP Classes

How to use?

Recommend this page to a friend!

      PHP Mosaic  >  All threads  >  How to use?  >  (Un) Subscribe thread alerts  
Subject:How to use?
Summary:Errors
Messages:17
Author:Jon Ezrin
Date:2009-06-30 23:55:19
Update:2010-04-22 03:09:04
 
  1 - 10   11 - 17  

  11. Re: How to use?   Reply   Report abuse  
Picture of Jon Ezrin 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.

  12. Re: How to use?   Reply   Report abuse  
Picture of johno dread 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);

  13. Re: How to use?   Reply   Report abuse  
Picture of davedee 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.

  14. Re: How to use?   Reply   Report abuse  
Picture of Jon Ezrin 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:

ÿØÿà&#65533;JFIF&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;ÿþ&#65533;;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75 ÿÛ&#65533;C&#65533;    $.' ",#(7),01444'9=82<.342ÿÛ&#65533;C  2

Suggestions?

  15. Re: How to use?   Reply   Report abuse  
Picture of johno dread 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

  16. Re: How to use?   Reply   Report abuse  
Picture of johno dread 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();

  17. Re: How to use?   Reply   Report abuse  
Picture of Jon Ezrin Jon Ezrin - 2010-04-22 03:09:04 - In reply to message 16 from johno dread
That did it! Thank you.

 
  1 - 10   11 - 17