Contact picture is programmatically loaded for each contact based on email. But for some contacts, the photo does not load in the Business card. It appears as only a box. The picture is present when double clicked on the card to view contact details.
I convert the pictures for proper dimensions and then load them as a file attachment.
//buildPath method fetches the file path from the Contact images folder (folderPath + "\" + email + ".png"). Returns the new path depending on the email of user
picPath = buildFilePath(email);
The picture had to be dimensioned to the business card attributes of width and height. When this dimension is met, the image loads in the business card as well.
Contact picture is programmatically loaded for each contact based on email. But for some contacts, the photo does not load in the Business card. It appears as only a box. The picture is present when double clicked on the card to view contact details. I convert the pictures for proper dimensions and then load them as a file attachment.
//buildPath method fetches the file path from the Contact images folder (folderPath + "\" + email + ".png"). Returns the new path depending on the email of user picPath = buildFilePath(email);
FileAttachment picAttach = newcontact.Attachments.AddFileAttachment(picPath); picAttach.IsContactPhoto = true; convertPic(personId, picPath); newcontact.Save();