Nathan Grass wrote:
>
> > However, you should generally use the extension instead. Not only is
> > it faster than opening every file, but the extension indicates whether
> > the file is meant to be treated as a GIF or JPEG. It's possible that
> > some other type of file could contain the above byte sequences by
> > coincidence.
>
> I would say that's a good idea. However I can see reasons for checking files
> for the likelihood of being GIF/JPEG regardless of extension. Since he didn't
> explain his reasons we can only assume he know what he's trying to accomplish.
>
> If he had told us he was trying to verify that a .jpg file was indeed a .jpg
> file then we would have more information and chances are good we could give him
> a better solution than what he is trying to do. If he was trying to find hidden
> (renamed to exclude .jpg or .gif) then again we know more about what he is
> trying to do.
Sometimes image files may not necessarily be stored (saved) with the
proper extension, thus I was looking for another means of checking
each individual file in a specified directory to look for images
(specifically jpeg's or gif's), without relying entirely on
extensions.
>
> I suspect he's trying to build a filter to grab images (maybe porn?) that have
> been grabbed from internet sites, news groups etc.
Actually I was sent by monsters from outer space to search all file
systems on earth and grab copies of all earth porn images to send back
to my galaxy!! (Only Joking!!, really!!!)
Seriously, in a sense I am building a kind of filter but, it has
nothing to do with grabbing porn off of newsgroups. It is merely for
the purpose of searching through vast quantities of huge directories
in search of image files which are then viewed and at the discretion
of the operator either deleted or moved to an appropriate directory
depending upon the image's content. In essence a sorting tool, to make
the process of locating and sorting images based upon their content, a
bit easier for the person who has been assigned that task... (not me
fortunately)...
/John <[EMAIL PROTECTED]>
email: [EMAIL PROTECTED]
Local mailserver <landreau.ruffe.edu> , remote <ns.computer.net>
Winston tastes good like a cigarette should!