ImageExporter.CreateBitmap Cannot output Chinese

1
zenggl
5/16/2022 8:24 AM

Point3D LTPoint = new Point3D(xMeter, yMeter, 0);
Point3D RBPoint = new Point3D(xMeter + 256, yMeter + 256, 0);
Matrix4D mktMatrix4D = WW.Cad.Base.DxfUtil.GetScaleTransform(LTPoint, RBPoint, new Point3D(0, 0, 0), new Point3D(256, 256, 0));

GraphicsConfig graphicsConfig = new GraphicsConfig(ArgbColors.White);
graphicsConfig.BackColor = ArgbColors.White;

SixLabors.ImageSharp.GraphicsOptions RenderOptions = new SixLabors.ImageSharp.GraphicsOptions();
RenderOptions.Antialias = true;


WW.Cad.Drawing.NetCore.NetCoreGraphics3D graphics3D = new WW.Cad.Drawing.NetCore.NetCoreGraphics3D(graphicsConfig, RenderOptions);
graphics3D.Transform = Matrix4D.Identity;
graphics3D.BoundingBox(mktBounds3D);
graphics3D.CreateDrawables(Model);

WW.Drawing.ArgbColor backColor = ArgbColor.FromRgb(239, 242, 249);

SixLabors.ImageSharp.Formats.Png.PngEncoder pngEncoder = null;
pngEncoder=new SixLabors.ImageSharp.Formats.Png.PngEncoder();
System.IO.Stream pngWriter = (System.IO.Stream)new System.IO.FileStream(mktPath, System.IO.FileMode.Create);

SixLabors.ImageSharp.Image<Rgba32> mktBitmap = ImageExporter.CreateBitmap<Rgba32>(graphics3D, ImageRenderOptions.Default, mktMatrix4D, backColor, 256, 256);
mktBitmap.Save(pngWriter, pngEncoder);
pngWriter.Close();

Wout
5/17/2022 10:26 AM

Hi,

I need input data to reproduce your problem. Please read the requirements for posting a bug report in the forum.

- Wout

zenggl
5/18/2022 6:27 AM

data file

Wout
5/18/2022 9:54 AM

Attachment is missing.

- Wout

1