fred_
fred_

Reputation: 1696

WIC - Exif Metadata Query - How to get image description

I have an image that has some French characters in the "Image Description" exif metadata field.

I m doing this (where reader is a IWICMetadataQueryReader* and value a PROPVARIANT):

reader->GetMetadataByName(L"/app1/ifd/{ushort=270}", &value);
if (value.vt == VT_LPSTR) result = value.pszVal;

and the result is "c'est l'été" instead of "c'est l'été"

How can I query so that it's a VT_LPWSTR instead, or any other way to get the correct string?

Upvotes: 0

Views: 230

Answers (1)

fred_
fred_

Reputation: 1696

I found a solution using CA2W like so

CA2W convertToUTF8(value.pszVal, CP_UTF8);
result = convertToUTF8.m_psz;

Upvotes: 0

Related Questions