Reply to PHP Notices generated by imagecolorat() on line 3864

PHP Notices generated by imagecolorat() on line 3864 new!
by Matt Cassarino, 15 years, 7 months ago
Hi Colin,

First off, thanks for this amazing upload script. I've been using it for over a year and it is by far the best PHP script that I've found for managing file uploads.

When uploading this file (http://supint.com/test/upload-class/home-page-concept.jpg) I use the 0.25 upload class to resize it to 546x450 pixels. The upload and resize work fine, but I'm getting really weird PHP Notices:

"PHP Notice: imagecolorat() [function.imagecolorat: 546,0 is out of bounds ... class.upload.php on line 3864"

My server ends up spitting out this Notice around 700 times per upload, for each pixel:
546,0
546,1
546,2
546,3
etc etc all the way up to 546,449 and also for the pixel range 145,0 up to 145,119. Weird!

This group of Notices does not show for all uploads, which makes it that much more confusing.

Here is another image file that generates the Notices, this time for the range of 337,0 to 337,449. http://supint.com/test/upload-class/sunflowers.jpg (note - this image is resized to be 337,450 and uploads just fine.)

The 0.24 version of your upload class doesn't cause these Notices, so I've ended up using that for now. But I'd like to use the 0.25 version. Thought you'd like to know about this possible bug and I would sure like to know if it's just me / my server or something else going on here.

Thanks,
Keep up the great work!

Matt
Seattle, WA (USA)Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important