as title!

解决方案 »

  1.   

    据说GDI+可实现,谁尝试过,有具体的例子吗?
      

  2.   

    go to  www.codeproject.com and search CxImage
      

  3.   

    我这里有,但不知如何给你,你也可以在网上搜索:付黎,Flib,PicViewerDemo。
    你试试看。这个库非常强大,支持多种图片格式,而且提供详细的文档和源代码。
      

  4.   

    如果要用GDI+,Platform SDK 有具体的例子如下:#include <windows.h>
    #include <gdiplus.h>
    #include <stdio.h>using namespace Gdiplus;
    int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
    {
       UINT  num = 0;          // number of image encoders
       UINT  size = 0;         // size of the image encoder array in bytes   ImageCodecInfo* pImageCodecInfo = NULL;   GetImageEncodersSize(&num, &size);
       if(size == 0)
          return -1;  // Failure   pImageCodecInfo = (ImageCodecInfo*)(malloc(size));
       if(pImageCodecInfo == NULL)
          return -1;  // Failure   GetImageEncoders(num, size, pImageCodecInfo);   for(UINT j = 0; j < num; ++j)
       {
          if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )
          {
             *pClsid = pImageCodecInfo[j].Clsid;
             free(pImageCodecInfo);
             return j;  // Success
          }    
       }   free(pImageCodecInfo);
       return -1;  // Failure
    }
    int main()
    {
       // Initialize GDI+.
       GdiplusStartupInput gdiplusStartupInput;
       ULONG_PTR gdiplusToken;
       GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);   CLSID   encoderClsid;
       Status  stat;
       Image*   image = new Image(L"Bird.bmp");   // Get the CLSID of the PNG encoder.
       GetEncoderClsid(L"image/png", &encoderClsid); //根据你的需要调用   stat = image->Save(L"Bird.png", &encoderClsid, NULL);   if(stat == Ok)
          printf("Bird.png was saved successfully\n");
       else
          printf("Failure: stat = %d\n", stat);    delete image;
       GdiplusShutdown(gdiplusToken);
       return 0;
    }
      

  5.   


    FLib图象处理库(1.10) 
     http://www.csdn.net/cnshare/soft/openfile.asp?kind=1&id=15124
      本封装库对图象读取,特效,显示及压缩算法进行了封装。
    功能有:对bmp,png,tiff,gif,pcx,tga,jpg等图像格式的读写,进行亮度,对比度,图像旋转,浮雕,颜色反转,锐化,平滑,马赛克处理。
    包括全部源代码.
    编译需要较新的SDK!  
     
      

  6.   

    JPEG的读取最好用Intel的IJL,不要用一点1.5版,体积太大了,用1.1版,
    Google上搜索一下就可以找到下载.
      

  7.   

    我已用GDI+尝试成功一部分了,虽然慢点,但巨简单,推荐大家一块研究研究!谢谢各位参与!
    接分