小弟初学VC
现在需要用vc编程实现读取png格式图片
看了很多帖子,知道大概意思是用GDI+实现
但是很多源程序都是将png格式转成其他格式或者是其他的各种格式之间的互相转换
我需要实现的仅仅是能把图片读取出来显示就行。
请教思路,并求代码(应该比转换格式要简单吧)

解决方案 »

  1.   

    用MFC的类:CImage
    CImage provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.
      

  2.   

    http://freeimage.sourceforge.net/download.html
      

  3.   

    Gdiplus::Graphics gr;
    Gdiplus::Image *pImage = Gdiplus::Image::FromFile(pngfile,FALSE);gr.DrawImage ( pImage, ... );
      

  4.   

    CxImage
    http://www.codeproject.com/bitmap/cximage.aspCxImage Sample
    http://www.codeproject.com/listctrl/ThumbsViewer.aspGDI+ Sample
    http://www.codeproject.com/vcpp/gdiplus/GdiPThumbnailsViewer.asp
      

  5.   

    偶给的“用mfc的CImage”也打不开?!其他兄台的链接需要代理。
      

  6.   

    Gdi+直接可以用,中文的讲Gdi+的书有周鸣扬的一本界面编程书