Free Support Forum -

Reading photo data from a VCard is broken

Using Aspose.Email 2.7, it is not possible to retrieve an inline photo from a VCard file using Aspose.Email.Formats.VCard.VCardContact.

The attached example VCard has an inline JPEG photo. The photo data retrieved using Aspose is not a valid image, because it appears that the bytes were Base64 decoded as a string using ASCII/default encoding rather than binary data (the first few bytes are 0x63 rather than the correct values).

Repro code:
var vcfTest = VCardContact.Load(file);
var ms = new MemoryStream(vcfTest.IdentificationInfo.Photo.Data);
using (var image = System.Drawing.Image.FromStream(ms)) //throw bad data
image.Save(file + “photo.jpg”);

Hi Barry,

Thank you for writing to us.

After an initial investigation, I was able to observe the issue while saving the photo data from VCard. I have logged this issue in our issue tracking system along with all the information to get further advice from our development team in this regard. Once we have any update for this issue, we’ll update you here via this thread.

The issue has been logged in our issue tracking system as: NETWORKNET-33710.

The issues you have found earlier (filed as NETWORKNET-33710) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.