I'm engaged in writing a program in C. A part of the program needs to
open a directory, read the filenames in the directory, and, for each
filename read must determine whether or not the file is an image file
(a jpeg of gif to be precise). If the file is an image file a process
is started does something or other with the image file. If the file is
not an image file (jpeg ot gif), the file is ignored and the next
filename is processed. This is done for each filename in the
specified directory.
This is very simple however, is there an relativly easy,
straightforward way to determine whether or not the file in question
is an image file? By determining whether the file is an image file or
not I mean specifically something more elegant than merely examining
the file name for a "jpg" or "gif" extension.
Any help, suggestions, etc. would be greatly appreiated.
Sincerely,
/John <[EMAIL PROTECTED]>
--
email: [EMAIL PROTECTED]
Local mailserver <landreau.ruffe.edu> , remote <ns.computer.net>
Someone beat the courtroom ticket!