---
title: "FormatReader Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatReader.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/)

# FormatReader Class
 
This is a base class for all format readers.
 
**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 FormatReader _Inherits SyncHandler _Implements IFormatReader
```
 
```csharp
public abstract class FormatReader : SyncHandler, IFormatReader
```
 
## Remarks
  
This class is derived by all format readers. It provides base functionality, i.e.:
 
- Opening file or stream with appropriate overload of [Open(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatReader_Open_1_bb3a7a4f.htm.md) method. To check whether the reader is already opened, use [Opened](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_Opened.htm.md) property.
- Retrieving specified frame via [LoadFrame(Int32)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatReader_LoadFrame_1_e1836fc4.htm.md) method. If you need to iterate all frames in the file, you can obtain total frame number using [FrameCount](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_FrameCount.htm.md) property.
- Checking whether this reader can read the file (i.e. you can determine whether file belongs specific format). Use [CheckForSupport(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatReader_CheckForSupport_1_bb3a7a4f.htm.md) method for it.
- Getting details about the format. Use [FormatName](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_FormatName.htm.md), [FormatDescription](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_FormatDescription.htm.md), [MimeType](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_MimeType.htm.md), [FilterString](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_FilterString.htm.md), [DefaultExtension](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_DefaultExtension.htm.md), and [MediaFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_FormatReader_MediaFormat.htm.md) properties.

Typically you use this class (rather than its descendant) when you use [CreateFormatReader(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatManager_CreateFormatReader_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 reader of proper type. It allows you to write the decoding code once for all formats you are going to load.
 
## 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.FormatReader
            - [Aurigma.GraphicsMill.Codecs.AdvancedPsdReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AdvancedPsdReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.AviReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.DSReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_DSReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.WMReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WMReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.QTReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_QTReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.BmpReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_BmpReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.CustomFormatReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CustomFormatReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.JpegReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_JpegReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.GifReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_GifReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.PcxReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PcxReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.Jpeg2kReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Jpeg2kReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.TiffReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_TiffReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.PngReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PngReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.WbmpReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WbmpReader.htm.md)
            - [Aurigma.GraphicsMill.Codecs.PsdReader](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PsdReader.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_96.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatReader.htm.md)![](https://www.graphicsmill.com/docs/gm5/ObjectModel3.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_24.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Frame.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_95.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IFrame.htm.md)
  
## See Also

### Reference

- [FormatReader Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_FormatReader.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
