Skip to main content
Participant
March 15, 2011
Question

ILibraryAssetThumbnail::GetImage

  • March 15, 2011
  • 1 reply
  • 512 views

ILibraryAssetThumbnail::GetImage copies "the thumbnail (of a ILibraryAsset) image bitmap to a buffer" :

InterfacePtr<ILibraryAsset>     asset ...


InterfacePtr<ILibraryAssetThumbnail> thumb (asset, IID_ILIBRARYASSETTHUMBNAIL);

if (!thumb) break;


int32 len;

thumb->GetImageSize (len);

if (len <= 0) break;


char * buffer = new char [len];

if (!buffer) break;

thumb->GetImage (buffer);

This works. But what can I do with *buffer*? Does anybody know the format of this or how to get an image (jpeg, gif, ...) out of this?

Thanks in advance,

   Paul.

This topic has been closed for replies.

1 reply

Participant
March 23, 2011

No awnser?

And this is the (German) awnser for the support case I opened : 

Wir möchten Sie davon in Kenntnis setzen, dass wir davon ausgehen, dass Ihr Problem gelöst wurde, und deshalb Ihre Support-Anfrage Nr.xxxxxxxxxx geschlossen haben.

Participant
March 25, 2011

Thanks to Roddy Ide I've a solution now :

The documentation states that thumbnails are "uncompressed 24-bit RGB images with a byte line width which is a multiple of 4 bytes". To convert this data to a JPEG you would need to use some 3rd party library like libJPEG to convert this image data.

And, yes, it works.

:-)