Re: GetImageSize() problem...
| From: | Rasmus Lerdorf | Date: | Wed, 16 May 2001 01:16:42 +0000 |
| Subject: | Re: GetImageSize() problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52967@lists.php.net to get a copy of this message | ||
> I might have the same problem with PHP 4.0.5 (win2k). Some of the images
> from my Kodak DC-260 digital camera, are not recognized correctly by
> getimagesize for some reason..
>
> Example:
>
> <?php
> $imagehw =
>
> GetImageSize("http://maasdelta.eve-software.com/foto/kinderspelen/P0007811.J
> PG");
> print $imagehw . "<BR>";
> print $imagehw[0] . "<BR>";
> print $imagehw[1] . "<BR>";
> print $imagehw[3] . "<BR>";
> ?>
> <IMG
> SRC="http://maasdelta.eve-software.com/foto/kinderspelen/P0007811.JPG">
>
> This image is just a normal JPG (1536x1024) taken directly from my camera.
>
> GetImageSize however, thinks it's dimensions are: 51088x38655 ??? This also
> happens when I access the file from a local drive.
>
> Anyone got a clue ?
I had a look at this problem in the plane coming back from Europe
yesterday. There is definitely a problem in the code. The
php_handle_jpeg() function is not hitting the right markers for some
reason. My brain was too oxygen-deprived to see the cause, but I will try
to get to it.
As a workaround for now I suggest you use the read_exif_data() function
instead. Compile using --enable-exif. That will definitely get you the
right dimensions along with many other properties.
-Rasmus