Group: Forum Members
Last Active: 3 Years Ago
Posts: 36,
Visits: 119
|
I have the following code which exports to a PNG format. I want to export to Bitmap but I cannot find the NBitmapEncoderSettings class to reference. How can I use the coding method below to export to a bitmap?
// Configure the decoder NPngEncoderSettings ImgPngEncoder = new NPngEncoderSettings(); ImgPngEncoder.ColorType = ENPngColorType.TrueColorWithAlpha; ImgPngEncoder.CompressionLevel = Nevron.Nov.Compression.ENCompressionLevel.BestCompression;
// Export To Stream NDrawingRasterImageExporter ImgRasterExporter = new Nevron.Nov.Diagram.Export.NDrawingRasterImageExporter((Nevron.Nov.Diagram.NDrawingDocument)DrawNOV.View.Content.OwnerDocument); ImgRasterExporter.SaveToStream(MemStrPng, ImgRasterExporter.GetDocumentContentBounds(), 300, NImageFormat.Png, ImgPngEncoder);
MemStrPng.Position = 0;
// Save To file MemStrPng.WriteTo(new FileStream(@"C:\AD_ATF\AD15.png", FileMode.Create));
|