image1.loadfromfile
image1.canvas.copyrect

解决方案 »

  1.   

    使用 Windows API 函数 StretchBltThe StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. Windows stretches or compresses the bitmap according to the stretching mode currently set in the destination device context. BOOL StretchBlt(    HDC hdcDest, // handle of destination device context 
        int nXOriginDest, // x-coordinate of upper-left corner of dest. rect. 
        int nYOriginDest, // y-coordinate of upper-left corner of dest. rect. 
        int nWidthDest, // width of destination rectangle 
        int nHeightDest, // height of destination rectangle 
        HDC hdcSrc, // handle of source device context 
        int nXOriginSrc, // x-coordinate of upper-left corner of source rectangle 
        int nYOriginSrc, // y-coordinate of upper-left corner of source rectangle 
        int nWidthSrc, // width of source rectangle 
        int nHeightSrc, // height of source rectangle 
        DWORD dwRop  // raster operation code 
       );
      

  2.   

    我的图像格式为:jpg
    真的很急?