0

I am working with WPD (Windows Portable Devices) API, and I have a problem. I have obtained image, video, music objects list on a device, and now I want to get thumbnail of images. I have used the following to get Stream of image objects:

spPropertyKeys->Add(WPD_RESOURCE_THUMBNAIL);

and then get stream by:

hr = pd_resource->GetStream(objectID,WPD_RESOURCE_THUMBNAIL, STGM_READ, &optimal_transfer_size, &src_data_stream);

output is src_data_stream.

I want to know that above the way to retrieve images's thumbnail is a true idea? How do I convert this stream to CBitmap? Please help me! Thanks so much!

Tiktac
  • 966
  • 1
  • 12
  • 32

1 Answers1

0

If this stream is a bitmap you should be able to load it with CImage::Load and use it...

xMRi
  • 14,982
  • 3
  • 26
  • 59
  • How do i sure this stream is a bitmap? I am using CImage::Load but some atributtes(such as m_hDc) notice that expression can't be evaluated, and m_nWidth, m_nHeight are zeros. – Tiktac Mar 17 '14 at 09:04