Is a file an image?

Richmond Mathewson richmondmathewson at gmail.com
Wed Jan 27 06:45:30 EST 2010


On 27/01/2010 12:49, David Bovill wrote:
> Thanks for the link Malte - seems possible but quite a bit of work. Works
> now on OSX, so I'll come back to it later for the cross platform stuff,.
>
> 2010/1/27 Malte Pfaff-Brill<revolution at derbrill.de>
>
>    
>> Taking a quick glimpse at Wikipedia suggests this should be pretty
>> straightforward:
>>
>>
>> http://en.wikipedia.org/wiki/Magic_number_%28programming%29#Magic_numbers_in_files
>>
>>      

Well, not perhaps as straightforward as one might expect as things seem 
to 'screw up' for
JPEGs and one needs a vast list of Magic Numbers for all the myriad 
image formats
around.

Notwithstanding all that here is a fairly silly proof-of-concept stack I 
just popped together:

http://andregarzia.on-rev.com/richmond/STUFF/FILECHEX.rev.zip

not rocket science, but is does seem to show a way forward.

ALL the code is in the button.

sincerely, Richmond.



More information about the use-livecode mailing list