DShow Dib to Bitmap Conversion

Converting from a DIB pointer to a bitmap image file.

Page 1 of 1

0 Replies - 704 Views - Last Post: 19 September 2009 - 06:44 AM Rate Topic: -----

#1 corsen2000  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 02-February 09

DShow Dib to Bitmap Conversion

Posted 19 September 2009 - 06:44 AM

Hello all. This is not a homework assignment. I am writing a program to play a video using directshow. I am doing this with a IVRM9 Windowless control. I am using the getcurrentimage method to get a byte* to the dib image.

	BYTE *lpDib = NULL;
	HRESULT hr2 = m_WindowlessControl->GetCurrentImage(&lpDib);
	if (SUCCEEDED(hr2))
	{
		CoTaskMemFree(lpDib);
	}



This code was provided from a msdn page. This seems to work fine, but what I need to do now is take my Byte* to the dib and save it to disk as a bitmap image. I have done a lot of searching and trial and error but have not been able to succeed. If anyone can point me in the right direction it would be greatly appreciated. If there is a prewritten library that could be used in the situation that would work to. Again this is not a school project, so I don't necessarily have to write the source code for this function. I have looked into OpenCV which has a conversion method but requires a DIB file. I have a DIB pointer.

Any guidance would be appreciated.
Thank You.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1