How Can We Help?

Displaying an Image (C++)

You are here:
< All Topics

This function displays an image at coordinates x, y in a display context:

void DisplayImg(HDC hDC, int x, int y) 
{
int w,h; 
LPBITMAPINFO lpbi; 
unsigned char *bits; 
GetImgSize(img,&w,&h); 
lpbi=GetImgBitmapInfo(img); 
bits=GetImgBitmap(img); 
StretchDIBits(hDC, x, y, w, h, 0, 0, w, h, bits, lpbi, DIB_RGB_COLORS,SRCCOPY);
}
Contact Us for FREE Consultation on Your OCR Project
=
Table of Contents

Title

Go to Top