如何在vc6.0下将图片bmp转换为jpg格式
最好有作好的函数,只要调用就可。
请高手提供源代码,谢谢,分不够再加
email: [email protected]

解决方案 »

  1.   

    看这里,对你有用的:
    http://expert.csdn.net/Expert/topic/2481/2481713.xml?temp=.2874567
      

  2.   

    下面的例子参考一下:
    Converting a BMP Image to a PNG Image
    To save an image to a disk file, call the Save method of the Image class. The following console application loads a BMP image from a disk file, converts the image to the PNG format, and saves the converted image to a new disk file. The main function relies on the helper function GetEncoderClsid, which is shown in Retrieving the Class Identifier for an Encoder.#include <windows.h>
    #include <gdiplus.h>
    #include <stdio.h>
    using namespace Gdiplus;INT GetEncoderClsid(const WCHAR* format, CLSID* pClsid);  // helper functionINT 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;
    }
      

  3.   

    http://www.csdn.net/Develop/read_article.asp?id=22948