Image Manipulation PHP Class 1.0.4
Friday, October 13, 2006Image Manipulation PHP Class, News
A new version of the Image Manipulation PHP Class has been released. Read further to see what is new in this version of the script.
What's new in this version:
- a new method was added - crop()
- a new property was added - preserveSourceFileTime which is by default set to TRUE and which instructs the scripts to preserve the date/time of the source files and pass it on to the target files - thanks patrick from swederland
- the flip_horizontal and flip_vertical methods were stil using the imagecopy function insetad of using the imagecopyresampled function
- the create_image_from_source_file() function was incorrectly checking for the existence of the source file: you could specify a valid path (but not a file) and the script would crash error because the path indeed existed even though it was not a file
- the result of the create_image_from_source_file() private method was poorly implemented and the script could be easily crashed by specifying bogus source files
October 18, 2006 8:56 AM
HI!Greetings from Singapore!
I came to your blog through Blogmad. Nice knowing you.
Best wishes.
December 27, 2006 4:58 AM
hi, i'm using your imagetransform class on this site: http://www.dexia-tower.com
when one downloads an image as a PDF, the source image is first resized, and then cropped using your class.
it worked fine. but since recently, it first triggers an error message related to the memory
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10324 bytes) in /var/www/vhosts/dexia-tower.com/httpdocs/_lib/classes/imagetransform/class.imagetransform.php on line 287
whereas it was working ok before. I don't understand why. Refreshing the page makes it work though, because the script does create the image. So the second time, it does not have to create it, and it can continue to generate the PDF file.
weird, hu?
December 27, 2006 5:05 AM
... further to debugging the error stated in my previous message, i think this class could use some GD checking maybe. It seems the error is caused by the GD library, and the command imagecreatetruecolor which is possibly not supported on my server...
i continue debugging...
June 02, 2007 11:22 PM
Gif transparent image resize doesn't seem to work with php 4.4.x. It did work php 5.1.6 on windows.
June 02, 2007 11:30 PM
In case of transparent images, this scipt doesn't seem to work with php 4.4.x or less. It creates a white background instead of keeping the image transparent.
June 02, 2007 11:57 PM
can it be from the gd version you are using?
June 08, 2007 7:41 PM
I found an error in 1.0.4 for the two flip functions. It seems copyimageresampled is missing two arguments. Simply repeating the last two again fixes the problem.
For Vertical it should be:
imagecopyresampled ($targetImageIdentifier, $sourceImageIdentifier, 0, $y, 0, $sourceImageHeight - $y - 1, $sourceImageWidth, 1, $sourceImageWidth, 1);
For Horizontal it should be:
imagecopyresampled($targetImageIdentifier, $sourceImageIdentifier, $x, 0, $sourceImageWidth - $x - 1, 0, 1, $sourceImageHeight, 1, $sourceImageHeight);
June 08, 2007 10:33 PM
you are right. somebody else also reported that and i completely forgot about it. thanks!
November 30, 2007 7:52 PM
I just downloaded the Image Manipulation class, and it works great...on my host server.
Is there anything I need to do to my local test box (IIS) to get it to work? Right now, all I see is a blank page.
December 01, 2007 12:54 AM
sorry, i never used IIS so i can't tell you what the problem is...