Hi,
The first two bytes of it will tell you - open a JPEG in a text
editor to see those.
You can read them in as a short and use the resultant value:
i=bs.readShort
if i = -40 then ' it's a JPEG (Hex FFD8 - JPEG/JFIF identifier)
-----
On 16 Jan 2007, at 00:17, Louis G5 Batayte wrote:
I let the user select a folder, then I search through the items in
that folder looking for jpeg files. Right now I am looking at the
extension to determine if it is a jpeg or not. But I am trying to
determine if a file without an extension is a jpeg file. If I take
a jpeg file with an extension, and use the MacOS System "Get Info"
to delete the extension, the System "Get Info" still displays the
"Kind" as a jpeg file. But I cannot figure how to determine this
from within RealBasic. When I look at the contents of the
folderitem, for the file without the jpeg extension, in debug
mode, there is nothing there to indicate the file type/kind. Any
suggestions?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>