A
Alex Vincent
HI all,
I'm storing images, jpgs/gifs/png/bmps and also some other binary files in a
SQL image field in a SQL 2k database.
Most of the images enter the database via a asp.net webform upload, here I
can use HttpPostedFile.ContentType to enter into the db the contenttype of
the file (because in some cases BMPs are actually renamed (by dumb users) to
..JPG which obviously causes problems...
The problem I have is where I am picking files off the file system (in a
bulk import) into a filestream, how can I tell if an image is really a JPG
or a BMP or wotever once its in a byte[] ?...
cheers if u can help..
alex
I'm storing images, jpgs/gifs/png/bmps and also some other binary files in a
SQL image field in a SQL 2k database.
Most of the images enter the database via a asp.net webform upload, here I
can use HttpPostedFile.ContentType to enter into the db the contenttype of
the file (because in some cases BMPs are actually renamed (by dumb users) to
..JPG which obviously causes problems...
The problem I have is where I am picking files off the file system (in a
bulk import) into a filestream, how can I tell if an image is really a JPG
or a BMP or wotever once its in a byte[] ?...
cheers if u can help..
alex