This class represents a frame of the WBMP format.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class WbmpFrame _ Inherits Frame
public sealed class WbmpFrame : Frame
This sample demonstrates how to convert a JPEG image into the WBMP. Draw attention, to be able to save to the WBMP format, we need to reduce colors to 1-bit color depth first.
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\Mountain.jpg") bitmap.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.Bicolor, _ Nothing) Dim writer As New Aurigma.GraphicsMill.Codecs.WbmpWriter("C:\Mountain.wbmp") Dim frame As New Aurigma.GraphicsMill.Codecs.WbmpFrame frame.SetBitmap(bitmap) bitmap.Dispose() writer.AddFrame(frame) frame.Dispose() writer.Dispose()
using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(@"c:\Mountain.jpg")) { bitmap.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.Bicolor, null); using (Aurigma.GraphicsMill.Codecs.WbmpWriter writer = new Aurigma.GraphicsMill.Codecs.WbmpWriter()) { using (Aurigma.GraphicsMill.Codecs.WbmpFrame frame = new Aurigma.GraphicsMill.Codecs.WbmpFrame()) { frame.SetBitmap(bitmap); writer.AddFrame(frame); } } }