User-1634117515 posted
hi,
I'm trying to create a vCard with a picture but when the vCard ist created it has not the picture, how Can I solve this?
Here is the code I'm using.
public static vCard card(Director d)
{
var myCard = new vCard()
{
FirstName = d.Nombre,
LastName = String.Empty,
Organization = "Ritch Mueller",
JobTitle = "Lic.",
StreetAddress = "Pegregal 24 Piso 10, Molino del Rey, 11040",
City = "CDMX",
CountryName = "Miguel Hidalgo",
Phone = d.Directo,
Mobile = d.Movil,
Email = d.Correo,
HomePage = "www.ritch.com.mx"
};
myCard.Image = File.ReadAllBytes(@"J:\Images\Usuarios\aalpizar.png");
using (var file = File.OpenWrite("D:\\me.vcf"))
using (var writer = new StreamWriter(file))
{
writer.Write(myCard.ToString());
}
return myCard;
}