[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C file recoginzed as image file
From: |
Chris Moore |
Subject: |
Re: C file recoginzed as image file |
Date: |
Sat, 06 Jan 2007 13:42:14 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Similarly, any text file which starts with the 4 characters "GIF8" is
> treated as if it was an image.
>
> Is there anything else we could check for
> to distinguish real GIF files from other files?
> Would someone please check the spec?
http://www.w3.org/Graphics/GIF/spec-gif89a.txt tells me that the first
3 bytes contain the fixed value 'GIF', and the next 3 bytes contain
the version number:
Version Numbers as of 10 July 1990 : "87a" - May 1987
"89a" - July 1989
Version numbers are ordered numerically increasing on the first two
digits starting with 87 (87,88,...,99,00,...,85,86) and
alphabetically increasing on the third character (a,...,z).
Immediately after this 6 byte header comes the logical screen
descriptor, which doesn't contain anything we can use to recognise a
valid image.
So a better image-type-header-regexps entry would be:
("\\`GIF[0-9][0-9][a-z]" . gif)
- Re: C file recoginzed as image file, (continued)
- Re: C file recoginzed as image file, Juanma Barranquero, 2007/01/21
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/22
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/14
- Re: C file recoginzed as image file, Stefan Monnier, 2007/01/14
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/15
- Re: C file recoginzed as image file, Giorgos Keramidas, 2007/01/15
- Re: C file recoginzed as image file, Jason Rumney, 2007/01/07
- Re: C file recoginzed as image file, Stefan Monnier, 2007/01/07
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/08
Re: C file recoginzed as image file, Richard Stallman, 2007/01/05
Re: C file recoginzed as image file, Richard Stallman, 2007/01/05