This class represents a frame of the BMP format.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class BmpFrame _ Inherits Frame
public sealed class BmpFrame : Frame
You can use BmpWriter class instead of the Save(String, IEncoderOptions) method of the Bitmap. In particular it enables you to save the image asynchronously.
The BmpWriter class usage is demonstrated below:
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\Mountain.jpg") Dim writer As New Aurigma.GraphicsMill.Codecs.BmpWriter("C:\Mountain.bmp") Dim frame As New Aurigma.GraphicsMill.Codecs.BmpFrame( _ Aurigma.GraphicsMill.Codecs.CompressionType.None) frame.SetBitmap(bitmap) bitmap.Dispose() writer.AddFrame(frame) frame.Dispose() writer.Dispose()
using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(@"c:\Mountain.jpg")) { using (Aurigma.GraphicsMill.Codecs.BmpWriter writer = new Aurigma.GraphicsMill.Codecs.BmpWriter()) { writer.Open(@"C:\Mountain.bmp"); using (Aurigma.GraphicsMill.Codecs.BmpFrame frame = new Aurigma.GraphicsMill.Codecs.BmpFrame()) { frame.Compression = Aurigma.GraphicsMill.Codecs.CompressionType.None; frame.SetBitmap(bitmap); writer.AddFrame(frame); } } }