Closed AsposeAG closed 1 year ago
Tagging subscribers to this area: @safern, @tannergooding See info in area-owners.md if you want to be subscribed.
Author: | AsposeAG |
---|---|
Assignees: | - |
Labels: | `area-System.Drawing`, `untriaged` |
Milestone: | - |
Thanks, @AsposeAG. I added it to future as I believe this might be related to us using libgdiplus
external library for drawing operations, however we are investigating on what our story for System.Drawing
should be on Unix
and will get back to these issues.
Hi, Could some one help, or suggest other way to do? I read image from ms word (ImagePart), in my laptop window worked well In centos 7, I got blank image
stream.Position = 0;
using (Metafile img = new Metafile(stream))
{
MetafileHeader header = img.GetMetafileHeader();
float scale = header.DpiX / 96f;
int width = (int)(scale * img.Width / header.DpiX * 100);
int height = (int)(scale * img.Height / header.DpiY * 100);
Bitmap bitmap = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(bitmap))
{
g.Clear(System.Drawing.Color.White);
g.ScaleTransform(scale, scale);
g.DrawImage(img, 0, 0);
}
return bitmap;
}
Closing this issue as System.Drawing.Common is only supported on Windows now.
Writing data to EMF file on Linux creates Zero length file on disk.
System Info: Kubuntu 20.04 .Net Core 3.1 System.Drawing.Common 5.0
Example project: [EmfBug.zip]EmfBug.zip