View Single Post
  #49 (permalink)  
Old 08-02-2007, 04:11 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 299
Karpagarajan is on a distinguished road
Post Re: VC++ Tips & Tricks

Check the image file as JPEG...
Hi buddies,
here is the code to check the given file format is JPEG. Useful one...

Bitmap bm(L"Picture.dat");
GUID guidFileFormat;

bm.GetRawFormat(&guidFileFormat);
if(guidFileFormat == ImageFormatJPEG)
MessageBox(0, " JPEG!", 0, MB_OK);
.............
thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Reply With Quote