in reply to Corrupted data problem in copyResampled using GD.pm

You said your image files are being uploaded correctly, and the first example you cite (picture of a VW beetle) shows a correct full-size image and a "truncated" thumbnail. But then in one of your sub-replies, you cited another web page with bad thumbnails, and when I followed one of those through to a full-size image, that full-size image had the same symptom as the thumbnail -- the lower few scan lines were solid grey instead of being the photograph.

Compare any of the thumbnails here against the full size image that is shown when you click on the thumbnail: http://mtziontrenton.com/cgi-bin/ezwebalbum.cgi?cgiAction=albumDisplay&category=Celebrations&album=Celebrations2

If you're creating the full-size image by expanding the thumbnail, then ignore this reply. (But why would you do that?)

Otherwise, recheck your process for uploading the images -- my guess would be there's a "dos text-mode" component somewhere in the transfer, and the image files tend to have a byte somewhere that equates to ^Z (EOF tag for dos text files), or else there's just a ^J ("new-line" in text files) where a text-mode transfer is prepending ^M ("carriage-return"), and that's screwing up the image stream. But that's just a guess.

  • Comment on Re: Corrupted data problem in copyResampled using GD.pm

Replies are listed 'Best First'.
Re: Re: Corrupted data problem in copyResampled using GD.pm
by brianviehland (Initiate) on Feb 11, 2004 at 08:09 UTC
    The full size image is being corrupted because it too was uploaded too large, and therefor was copyResized the same way to make it a max of 600 pixels. I didn't want the directories filling up with 1MB files, so they are all checked for size and shrunk to 600 pixels max, then a thumbnail is created at 150 pixels max. Both processes use the same code, so the corruption happening in the original and the thumbnail are stemming from the same problem.

    I'll look at any ^J or ^Z files in the data stream of the jpeg and see what I might find... -Brian