---
title: "SwfEncoderOptions Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# SwfEncoderOptions Class
 
This class holds SWF encoder options.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public NotInheritable Class SwfEncoderOptions _Inherits EncoderOptions
```
 
```csharp
public sealed class SwfEncoderOptions : EncoderOptions
```
 
## Remarks
  
This class enables to initialize both entire SWF file and separate frames settings. Usually you can use this class from [Saving](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_Bitmap_Saving.htm.md) event handler to modify both global and frames settings. If you set global settings for the same file multiple times, only settings specified at the first time are used.
 
This table gives the explanation for all SWF settings:
 
|  Property |  Description |
| --- | --- |
 |  [Compression](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_Compression.htm.md) (frame) |  Specifies a compression type for the SWF frame. |
 |  [Delay](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_Delay.htm.md) (frame) |  Specifies a delay time for this frame. |
 |  [DisposalMethod](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_DisposalMethod.htm.md) (frame) |  Specifies a disposal method for the frame (what to do with the screen when new frame is being displayed). |
 |  [Quality](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_Quality.htm.md) (frame) |  Specifies a JPEG quality (used if compression type is [Jpeg](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md)). |
 |  [BackgroundColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_BackgroundColor.htm.md) (global) |  Specifies a background color for the SWF movie. |
 |  [Width](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_Width.htm.md) (global) |  Specifies a SWF movie width. |
 |  [Height](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions_Height.htm.md) (global) |  Specifies a SWF movie height. |
 
[MediaFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_MediaFormat.htm.md) property of this class always returns value that equals to [SwfFormat](https://www.graphicsmill.com/docs/gm5/F_Aurigma_GraphicsMill_Codecs_FormatManager_SwfFormat.htm.md) static field of the [FormatManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md) class. [Left](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_Left.htm.md) and [Top](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_Top.htm.md) are used to specify offset of the frame relatively top left corner of the SWF movie.
 
## Examples
  
The code sample below converts JPEG file into the SWF image frame.
 
```
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\Mountain.jpg")

bitmap.Save("C:\Mountain.swf", _
    New Aurigma.GraphicsMill.Codecs.SwfEncoderOptions(30))

bitmap.Dispose()
```
 
```csharp
using (Aurigma.GraphicsMill.Bitmap bitmap = 
            new Aurigma.GraphicsMill.Bitmap(@"C:\Mountain.jpg"))
{
    bitmap.Save(@"C:\Mountain.swf", 
        new Aurigma.GraphicsMill.Codecs.SwfEncoderOptions(30));
}
```
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.Codecs.EncoderOptions](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_EncoderOptions.htm.md)
        - Aurigma.GraphicsMill.Codecs.SwfEncoderOptions
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_226.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_19.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Frame.htm.md)
  
## See Also

### Reference

- [SwfEncoderOptions Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_SwfEncoderOptions.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
