This class represents a frame of the SWF format.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class SwfFrame _ Inherits Frame
public sealed class SwfFrame : Frame
To create an animated SWF movie we need to use the SwfWriter class. The movie is created from the several JPEG files.
Dim dir As String = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\" Dim images As String() = {"Blue hills.jpg", "Sunset.jpg", "Water lilies.jpg", "Winter.jpg"} Dim bitmap As New Aurigma.GraphicsMill.Bitmap Dim writer As New Aurigma.GraphicsMill.Codecs.SwfWriter("C:\Mountain.swf") For Each image As String In images bitmap.Load(dir & image) Dim frame As New Aurigma.GraphicsMill.Codecs.SwfFrame frame.Compression = Aurigma.GraphicsMill.Codecs.CompressionType.Jpeg frame.Quality = 30 frame.Delay = 100 frame.SetBitmap(bitmap) writer.AddFrame(frame) frame.Dispose() Next bitmap.Dispose() writer.Dispose()
string dir = @"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\"; string[] images = {"Blue hills.jpg", "Sunset.jpg", "Water lilies.jpg", "Winter.jpg"}; using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap()) { using (Aurigma.GraphicsMill.Codecs.SwfWriter writer = new Aurigma.GraphicsMill.Codecs.SwfWriter(@"C:\Mountain.swf")) { foreach (string image in images) { bitmap.Load(dir + image); using (Aurigma.GraphicsMill.Codecs.SwfFrame frame = new Aurigma.GraphicsMill.Codecs.SwfFrame()) { frame.Compression = Aurigma.GraphicsMill.Codecs.CompressionType.Jpeg; frame.Quality = 30; frame.Delay = 100; frame.SetBitmap(bitmap); writer.AddFrame(frame); } } } }