Hello,
How can I split an image in smaller images?
I have to print a big bmp/jpg-file, but the size is bigger than the paper.
I want to split the image, so I can print each part on a separate paper, with a nice title.
HBITMAP DuplicateBitmap( HBITMAP hbmpSrc )
{
HBITMAP hbmpOldSrc, hbmpOldDest, hbmpNew;
HDC hdcSrc, hdcDest;
BITMAP bmp;
hdcSrc = CreateCompatibleDC( NULL );
hdcDest = CreateCompatibleDC( hdcSrc );
GetObject( hbmpSrc, sizeof( BITMAP ), &bmp );
hbmpOldSrc = ( HBITMAP ) SelectObject( hdcSrc, hbmpSrc );
hbmpNew = CreateCompatibleBitmap( hdcSrc, bmp.bmWidth,
bmp.bmHeight );
hbmpOldDest = ( HBITMAP ) SelectObject( hdcDest, hbmpNew );
BitBlt( hdcDest, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcSrc, 0, 0,
SRCCOPY);
SelectObject( hdcDest, hbmpOldDest );
SelectObject( hdcSrc, hbmpOldSrc );
DeleteDC( hdcDest );
DeleteDC( hdcSrc );
return hbmpNew;
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 106 guests