By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

GetImageSize problem!

P: n/a
Hey All,

Running Redhat9, Apache 2.0.40, PHP 4.3.4.

GD support is enabled.

GetImageSize() returns FALSE on almost all JPGs, but does return with
the correct info on *some* JPGs. The array returned is empty.

This problem did not exist on my RedHat7.2, PHP 4.3.3, Apache 1.36
system.

I noticed references to this problem in earlier versions of PHP
relating to streams, but supposedly fixed. Still a problem for me!

Please help!
Thanks,
Jonathan.
ki*******@yahoo.com
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Jonathan Lindo wrote:
Hey All,

Running Redhat9, Apache 2.0.40, PHP 4.3.4.

GD support is enabled.

GetImageSize() returns FALSE on almost all JPGs, but does return with
the correct info on *some* JPGs. The array returned is empty.

This problem did not exist on my RedHat7.2, PHP 4.3.3, Apache 1.36
system.

I noticed references to this problem in earlier versions of PHP
relating to streams, but supposedly fixed. Still a problem for me!

Please help!
Thanks,
Jonathan.
ki*******@yahoo.com

Two things I can think off:

1) Are you sure they are jpg's, and not gif's that have "jpg" file
suffixes????

2) I believe there are different types of JPGs - I can't remember the
reason behind it, but I believe those that originate from Digital
camera's are likely to cause you the problem (though I have never
actually found the problem myself, I have read it somewhere (perhaps GD
info? Honestly... I can't recall at the moment). I believe jpg's
contain info (it can contain copyright info or some message text that is
not displayed when the image is displayed plus some other crap). I
believe the photos from *some* digital cameras do their best to create
small image files and therefore leave out some of this information -
This *might* be the cause of your problem.

Suggestion:
http://ca2.php.net/manual/en/functio...-imagetype.php

Run imagetype() against a 'good' image, and a 'bad' image and see if any
of the info returned after using the above function differs...

Lastly... if none of the above helps, might I suggest you post an update
on this post and tell folk exactly which version of GD that you are
using - I'm not aware of any problems with any GD functions that are
jpeg related, but someone else might...

Hope something above helps...

randelld
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.