forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: linuxhata on September 10, 2005, 11:10:08 pm

Title: Gallery won't accept photos made with some mobile phones.
Post by: linuxhata on September 10, 2005, 11:10:08 pm
Warning: imagecreatefromjpeg(): 'albums/userpics/Image010.jpg' is not a valid JPEG file in /home/janigs/public_html/uzrdeli/include/picmgmt.inc.php on line 209

giving me error like this. The pictures is all OK, and can be opened on PC or posted into any another gallery without problem. This mostly occurs with photos taken by NOKIA handsets, resolution 640x480.
Title: Re: Gallery won't accept photos made with some mobile phones.
Post by: Nibbler on September 10, 2005, 11:30:50 pm
Can you post a sample picture ?
Title: Re: Gallery won't accept photos made with some mobile phones.
Post by: linuxhata on September 11, 2005, 12:24:43 am
yes, here it is:

http://www.damireke.com/sample.jpg
Title: Re: Gallery won't accept photos made with some mobile phones.
Post by: Nibbler on September 11, 2005, 01:48:45 am
The error message is correct, the jpeg file is not valid.

Code: [Select]
[nibbler@localhost ~]$ identify sample.jpg
identify: Corrupt JPEG data: 175 extraneous bytes before marker 0xd9 `sample.jpg'.
sample.jpg JPEG 640x480 DirectClass 51kb 0.020u 0:01

That is enough for GD2 to be unable to process the image. I can however confirm that Imagemagick can handle the file correctly. Use that if it is available on your server.
Title: Re: Gallery won't accept photos made with some mobile phones.
Post by: artistsinhawaii on September 11, 2005, 02:27:55 am
I opened your file on my PC and resaved it under a new name and it worked with GD2.  You might want to try that with your nokia pictures.  The original file did not work.

Dennis

Title: Re: Gallery won't accept photos made with some mobile phones.
Post by: linuxhata on September 11, 2005, 08:45:05 am
Ok, I'll try to switch to ImageMagick.

Opening file on PC and re-saving it is not good idea, because main plot of my gallery is to allow mobile users make direct upload from their devices to gallery.