How to recognize a JPEG or a GIF image when the file has no extension?

  • Thread starter =?iso-8859-1?B?Q2zpbWVudA==?=
  • Start date
?

=?iso-8859-1?B?Q2zpbWVudA==?=

Hi!

I download images which have no extension, with a System.Net.WebClient.
I would like to save them with a different name and with the extension
..jpg if they really are of JPEG type. Because sometimes I could receive
GIF images, and I would like to do the same.

I tried to look for the image type in the WebClient object, but I
didn't find anything.
And once the file has been saved without an extension on my computer,
when I right-click on it, and then Properties and Summary, Windows
seems to know that it is a JPEG or a GIF file.

I read on the internet that these informations are contained in the
IPTC datas, but I have no idea on how to get them from the file.

Any ideas for that would be welcome.

Thx in advance.
It is pretty much a hurry!!

Clement
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top