Quantcast
Channel: Off-Topic Posts (Do Not Post Here) forum
Viewing all articles
Browse latest Browse all 14169

Displaying Images using Win32 API

$
0
0
hi Guys.I'm a beginner working with Win32 API. i want to know how to display Large size images(5MP-2592x1944) in Window/Dialog by using StretchDIBits() API function without affecting the Quality of image. When i do this by using StretchDIBits() function the image is appearing too noisy. Could anyone guide me on this please? i was told to use windows API alone. can i do this by using windows API alone?
My function:
case WM_PAINT:
{
if(g_flag==1)
{
UINT Dx=10,Dy=75,DWidth=1024,DHeight=768;
hdc = BeginPaint(hDlg, &ps);
HDC Dhdc=GetWindowDC(hDlg);
StretchDIBits(Dhdc,Dx,Dy,DWidth,DHeight,0,0,g_Width,g_Height,g_pRGB_Buffer,&g_Bitmapinfo,DIB_RGB_COLORS,SRCCOPY);
DeleteDC(hdc);
DeleteDC(Dhdc);
}
// TODO: Add any drawing code here...
EndPaint(hDlg, &ps);
}

Viewing all articles
Browse latest Browse all 14169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>