Profile Picture

How To: Save to Bitmap Programatically

Posted By Ashley Davy 3 Years Ago

How To: Save to Bitmap Programatically

Author
Message
Ashley Davy
Question Posted 3 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

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));





Similar Topics


Reading This Topic

1 active, 1 guest, 0 members, 0 anonymous.
No members currently viewing this topic!