dave <[EMAIL PROTECTED]> writes:
> oops, just on another side note, I thought i'd try loading the image
> resource into the PelJpeg constructor, in the hope that perhaps that
> would reduce the amount of memory used.
> the resource was definitely a gd resource
> strange, $exif = $origJpeg->getExif(); did not cause an error
> but the code inside the if statement didn't execute
>
> $origJpeg = new PelJpeg($imageResource);
> $exif = $origJpeg->getExif();
> if (!is_null($exif)) {
> // execute code
> }
Well, I have only tested this new piece of code using the resize.php
script I committed along with it. Does that work for you?
I'm still using PHP 5.1.6 here (from Debian testing/Etch) whereas you
said you used 5.2.0. The code in the constructor is fairly simple: it
does
is_resource($data) && get_resource_type($data) == 'gd'
and if that test is true, then it does
ob_start();
ImageJpeg($data);
$bytes = ob_get_clean();
$this->load(new PelDataWindow($bytes));
That code should be corret, I think?
Try printing out the result of get_resource_type() on your image; mine
said 'gd' so I hope all image resources will say that, but one never
knows -- I didn't find any documentation that promised that 'gd' would
be returned.
You can also try and activate the debug mode by calling
Pel::setDebug(true); That should tell you more about what PEL is
doing.
--
Martin Geisler --- <[EMAIL PROTECTED]> --- http://mgeisler.net
Read, write, create Exif data in PHP with PEL: http://pel.sf.net
Take control of your webserver with PHP Shell: http://phpshell.sf.net
pgpmlGtyZNUuZ.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ PEL-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pel-devel
