This class represents a frame of the JPEG2000 format.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class Jpeg2kFrame _ Inherits Frame
public sealed class Jpeg2kFrame : Frame
You can use Jpeg2kWriter class instead of the Save(String, IEncoderOptions) method of the Bitmap. In particular it enables you to save the image asynchronously.
The Jpeg2kWriter class usage is demonstrated below:
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\Mountain.jpg") Dim writer As New Aurigma.GraphicsMill.Codecs.Jpeg2kWriter("C:\Mountain2.jp2") Dim frame As New Aurigma.GraphicsMill.Codecs.Jpeg2kFrame frame.Rate = 0.1 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.Jpeg2kWriter writer = new Aurigma.GraphicsMill.Codecs.Jpeg2kWriter()) { writer.Open(@"C:\Mountain2.jp2"); using (Aurigma.GraphicsMill.Codecs.Jpeg2kFrame frame = new Aurigma.GraphicsMill.Codecs.Jpeg2kFrame()) { frame.Rate = 0.1f; frame.SetBitmap(bitmap); writer.AddFrame(frame); } } }