Re: problems with several JPEGs in GD2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i just opened 4 jpg files...dunno about where the header is...coz i
didn't find anything common at the begining of the files (so i doesn't
seem to have a header at the "head").

i found (only) one jpg which had JFIF as the 7th to 10th bytes.

i did notice that the _last 2 bytes_ are FF D9 in *all* 5 jpg's. that
should be a good way to check depending on how the jpeg's in question
differ from the real thing.

fopen image; fseek ( $handle, -2 , SEEK_END);
$last_2_bytes = fread ($handle, 2 [bytes]);
if ($last_2_bytes == 0xffd9), perhaps an ok jpg.

have u done anything to the images? are they photos, scanned, gaphics
(from photoshop/gimp)?

On Tue, 1 Mar 2005 09:44:08 +0000, AdamT <adwulf@xxxxxxxxx> wrote:
> I've had similar problems to that.
> 
> I usually either open the image with notepad, or some Hex Editor, and
> see what the bits are in the file header (eg BM for Bitmap, Gif89a for
> GIFs, JFIF for JPEGs...)

-- 
]#
Anirudh Dutt


...pilot of the storm who leaves no trace
like thoughts inside a dream

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux