StretchDIBits

Reply

Join Date: Jun 2005
Posts: 6
Reputation: maldini is an unknown quantity at this point 
Solved Threads: 0
maldini maldini is offline Offline
Newbie Poster

StretchDIBits

 
0
  #1
Jun 8th, 2005
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.

  1. HDC dc = BeginPaint( hwnd, &ps );
  2.  
  3. BITMAPINFO bmi;
  4. memset(&bmi, 0, sizeof(bmi));
  5. bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
  6. bmi.bmiHeader.biWidth = 320;
  7. bmi.bmiHeader.biHeight = -240; // top-down image
  8. bmi.bmiHeader.biPlanes = 1;
  9. bmi.bmiHeader.biBitCount = 0;
  10. bmi.bmiHeader.biCompression = BI_JPEG;
  11. bmi.bmiHeader.biSizeImage = w->length;
  12.  
  13. int ww = StretchDIBits(dc, 0, 0, 32, 32, 0, 0, 32, 32, w->p, &bmi, DIB_RGB_COLORS, SRCCOPY);
  14.  
  15. EndPaint( hwnd, &ps );
<< moderator edit: added [code][/code] tags >>


Maldini
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC