---
title: "FormatWriter Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatWriter.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/)

# FormatWriter Class
 
This is a base class for all format writers.
 
**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 MustInherit Class FormatWriter _Inherits SyncHandler _Implements IFormatWriter, IPixelFormatSupport
```
 
```csharp
public abstract class FormatWriter : SyncHandler, IFormatWriter, IPixelFormatSupport
```
 
## Remarks
  
This class is derived by all format writers. It provides the follwoing base functionality:
 
- Opening file or stream with appropriate overload of [Open(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_Open_1_bb3a7a4f.htm.md) method. To check whether the writer is already opened, use [Opened](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_Opened.htm.md) property.
- Writing frames (or one frame if only one is allowed) using [AddFrame(IFrame)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_AddFrame_1_7fae152b.htm.md) property.
- Checking whether the bitmap with certain pixel format can be saved into this file format without conversion. Use [IsPixelFormatSupported(PixelFormat)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatWriter_IsPixelFormatSupported_1_3e209c07.htm.md) method and [SupportedPixelFormats](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_SupportedPixelFormats.htm.md) property for it.
- Getting details about the format. Use [FormatName](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_FormatName.htm.md), [FormatDescription](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_FormatDescription.htm.md), [MimeType](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_MimeType.htm.md), [FilterString](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_FilterString.htm.md), [DefaultExtension](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_DefaultExtension.htm.md), and [MediaFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatWriter_MediaFormat.htm.md) properties.

Typically you use this class (rather than its descendant) when you use [CreateFormatWriter(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatManager_CreateFormatWriter_1_bb3a7a4f.htm.md) method of the [FormatManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md) class to get a format writer of proper type. It allows you to write the encoding code once for all formats you are going to save.
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.SyncHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
        - Aurigma.GraphicsMill.Codecs.FormatWriter
            - [Aurigma.GraphicsMill.Codecs.AviWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.BmpWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_BmpWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.CustomFormatWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CustomFormatWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.JpegWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_JpegWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.GifWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_GifWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.Jpeg2kWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Jpeg2kWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.TiffWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_TiffWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.PngWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PngWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.WbmpWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WbmpWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.PdfWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PdfWriter.htm.md)
            - [Aurigma.GraphicsMill.Codecs.SwfWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_SwfWriter.htm.md)
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_109.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatWriter.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_107.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IEncoderOptions.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_108.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IFrame.htm.md)
  
## See Also

### Reference

- [FormatWriter Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_FormatWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
