maldini1010
Programmer
Hi,
I am having problems with the StretchDIBits function. The w->length contains the size of the jpeg. And the w->p contains a pointer to the begining of the jpeg data. Nothing displays onto the screen just a white box. Any Help would be really appriciated.
HDC dc = BeginPaint( hwnd, &ps );
BITMAPINFO bmi;
memset(&bmi, 0, sizeof(bmi));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = 320;
bmi.bmiHeader.biHeight = -240; // top-down image
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 0;
bmi.bmiHeader.biCompression = BI_JPEG;
bmi.bmiHeader.biSizeImage = w->length;
int ww = StretchDIBits(dc, 0, 0, 32, 32, 0, 0, 32, 32, w->p, &bmi, DIB_RGB_COLORS, SRCCOPY);
EndPaint( hwnd, &ps );
Thanks
maldini
I am having problems with the StretchDIBits function. The w->length contains the size of the jpeg. And the w->p contains a pointer to the begining of the jpeg data. Nothing displays onto the screen just a white box. Any Help would be really appriciated.
HDC dc = BeginPaint( hwnd, &ps );
BITMAPINFO bmi;
memset(&bmi, 0, sizeof(bmi));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = 320;
bmi.bmiHeader.biHeight = -240; // top-down image
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 0;
bmi.bmiHeader.biCompression = BI_JPEG;
bmi.bmiHeader.biSizeImage = w->length;
int ww = StretchDIBits(dc, 0, 0, 32, 32, 0, 0, 32, 32, w->p, &bmi, DIB_RGB_COLORS, SRCCOPY);
EndPaint( hwnd, &ps );
Thanks
maldini