You are here: Re: [PHP] problems with several JPEGs in GD2 « PHP « IT news, forums, messages
Re: [PHP] problems with several JPEGs in GD2

Posted by Anirudh Dutt on 03/01/05 12:36

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@gmail.com> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация