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);
}
Previous Constants Used By SimpleOCR (VB)
Next Introduction to SimpleOCR SDK
Table of Contents
Contact Us for FREE Consultation on Your OCR Project
Go to Top