[Top][All Lists]

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

Re: C file recoginzed as image file

From: Stuart D. Herring
Subject: Re: C file recoginzed as image file
Date: Mon, 8 Jan 2007 16:11:31 -0800 (PST)
User-agent: SquirrelMail/1.4.8-2.el3.7lanl

> That's more of a philosophical question, but a JPEG image is a JPEG
> image. Whether you treat it like text, bytes, an image or a
> pseudo-random source is another matter entirely. Your camera didn't
> take a text file or a bit of random binary data, it took a picture in
> JPEG format. It's a practical question: how many times that image will
> be used as that, an image, as opposed to as any other thing?

It's true that a JPEG image is a JPEG image, but "foo.jpg" (or even
"foo.c") is not a JPEG image, it's a file (well, a filename, but consider
the associated file).  And a (seekable) file is a sequence of bytes, not
an image.  An image can be constructed from it, but just as you said it's
a matter of how you treat it.

The question here (for Emacs) is not "What is the source and importance of
this data?" whose answer might be "A camera; it's a picture of the
Thames." but rather "In what manner should these bytes with this name be
presented to the user?" whose answer might be "As a C file, since its
extension is `.c'." or "As a JPEG image, because JPEG images begin the
same way as these bytes do.".  Poorer reasons to be sure than "It's a
picture of the Thames because that's where I was when I took it.", but
they're the best we can hope to do; the problem is which heuristics are
most useful and how to resolve conflicts in the partial information we

Finally, remember that we don't have a concept of "that image" for
counting usage: this decision has to be made the first time we see a file,
regardless of its history of usage.


This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during

reply via email to

[Prev in Thread] Current Thread [Next in Thread]