UnableToReadImageData Error
Posted: 2015-11-04T10:10:04-07:00
I am using C# and I am converting wmf to svg and I get the following error
WmfToSVG.vshost.exe: UnableToReadImageData `C:/Users/pieterv/AppData/Local/Temp/magick-28656-E3tgAU5Xj41' @ error/emf.c/ReadEMFImage/750
It used to work fine but all of a sudden did this.
Thanks for your help
Here is my code
WmfToSVG.vshost.exe: UnableToReadImageData `C:/Users/pieterv/AppData/Local/Temp/magick-28656-E3tgAU5Xj41' @ error/emf.c/ReadEMFImage/750
It used to work fine but all of a sudden did this.
Thanks for your help
Here is my code
Code: Select all
List<WmfToSVG.DoorImage> Images = Database.DoorImages.ToList();
if (Images != null)
{
foreach (WmfToSVG.DoorImage Image in Images)
{
if (Image != null)
{
try
{
using (MagickImage MagicImage = new MagickImage(((byte[])Image.Image.ToArray())))
{
MagicImage.Format = MagickFormat.Svg;
string svg = Encoding.UTF8.GetString(MagicImage.ToByteArray());
Image.SVG = svg;
Database.SaveChanges();
}
}
catch
{
}
finally
{
backgroundWorker1.ReportProgress(1);
}
}
}
}