Click to See Complete Forum and Search --> : display a .jpg file with MFC ?


sayoyo
May 19th, 1999, 10:54 AM
Hi,

Is there a way to display a .jpg file by using MFC? or to convert a .jpg file to a bitmap?
Thanks,

May 19th, 1999, 12:45 PM
In CodeGuru's "Bitmap & Palettes" section, there are several "external links" given that contain articles on, among other things, decoding jpegs to bmps. I believe they ultimately rely on Thomas Lane's Independent JPEG Group's jpeg.lib for the encoding/decoding. Be prepared to tinker a bit to get things to work. I myself am in the process of putting together a very simple MFC-based jpeg/bmp encoder/decoder using jpeglib and Wes Roger's "Writing a DIB to a JPEG File" article. If I make any progress anytime soon, I'll give you and update. Good luck!

Cosmin
May 19th, 1999, 04:05 PM
Hi,

Ever tried Win32SDK LoadImage function?

vshewale
January 24th, 2001, 01:14 AM
Hi

can u send me the code for same?

Vishal SHewale

Jens Schacherl
January 25th, 2001, 06:07 AM
Try OleLoadPicture & search MSDN for the sample "LOADPIC.EXE".

HTH, Jens