急!

解决方案 »

  1.   

    只求实现的话就用GDI+的Image类,非常简单就可以做到。
      

  2.   

    JpegFile - free JPG (and BMP) reading and writing code.
    http://www.smalleranimals.com/jpegfile.htmImageHandler: A Component to Copy an HDC Area to a JPEG File
    http://codeguru.earthweb.com/bitmap/ImageHandler.htmlWriting a DIB to a JPEG file 
    http://codeguru.earthweb.com/bitmap/dib_to_jpeg.shtmlCreating a DIB section from a BMP file
    http://codeguru.earthweb.com/bitmap/dibsection_from_bmp.shtml
      

  3.   

    Intel有个IJL应用库,可以直接拿来用。搜索一下"IJL"就可以找到。
      

  4.   

    http://www.image2003.com/image2003.asp?nParentID=4&nSelfShow=1
      

  5.   

    http://www.vckbase.com/code/listcode.asp?mclsid=7&sclsid=703
    可以直接用的
      

  6.   

    vc.net提供了个atl CImage
    可以实现转换
    这又各小例子
    http://www.vccode.com/file_show.php?id=2205
      

  7.   

    参考参考:
    //    参数  
    //            xs  =  图象x轴大小  
    //            ys  =  图象y轴大小  
    //            quality  =  jpeg图象质量  
     
    VOID        SaveCurScreenJpg(LPCWSTR  pszFileName,  int  xs,  int  ys,  int  quality)  
    {  
           HWND        hwnd  =  ::GetDesktopWindow();  
           HDC          hdc  =  GetWindowDC(NULL);  
           int          x  =  GetDeviceCaps(hdc,  HORZRES);  
           int          y  =  GetDeviceCaps(hdc,  VERTRES);  
           HBITMAP  hbmp  =  ::CreateCompatibleBitmap(hdc,  x,  y),  hold;  
           HDC          hmemdc  =  ::CreateCompatibleDC(hdc);  
           hold        =  (HBITMAP)::SelectObject(hmemdc,  hbmp);  
           BitBlt(hmemdc,  0,  0,  x,  y,  hdc,  0,  0,  SRCCOPY);  
           SelectObject(hmemdc,  hold);  
           {  
                   Bitmap    bit(xs,  ys),  bit2(hbmp,  NULL);  
                   Graphics        g(&bit);  
                   g.ScaleTransform((float)xs/x,  (float)ys/y);  
                   g.DrawImage(&bit2,  0,  0);  
     
                   CLSID                          encoderClsid;  
                   EncoderParameters  encoderParameters;  
     
                   encoderParameters.Count  =  1;  
                   encoderParameters.Parameter[0].Guid  =  EncoderQuality;  
                   encoderParameters.Parameter[0].Type  =  EncoderParameterValueTypeLong;  
                   encoderParameters.Parameter[0].NumberOfValues  =  1;  
                   encoderParameters.Parameter[0].Value  =  &quality;  
     
                   GetEncoderClsid(L"image/jpeg",  &encoderClsid);  
                   bit.Save(pszFileName,  &encoderClsid,  &encoderParameters);  
           }  
           ::DeleteObject(hbmp);  
           ::DeleteObject(hmemdc);  
           return;  
    }