tags:

views:

485

answers:

3

Hi i want to load png images and jpeg images.

can anyone help me?

A: 

CxImage

Also GDI+

renick
+2  A: 

You can use CImage class which supports the following formats: JPEG, GIF, BMP, and PNG.

http://msdn.microsoft.com/en-us/library/bwea7by5%28VS.80%29.aspx

Use Load function to load file from disk:

http://msdn.microsoft.com/en-us/library/tf4bytf8%28VS.80%29.aspx

Alex Farber
+3  A: 
CImage image;
image.Load(_T("C:\\image.png")); // just change extension to load jpg
CBitmap bitmap;
bitmap.Attach(image.Detach());
Nikola Smiljanić
thanks Nikola it works cool.
Ashish