---
title: "FormatManager..::.GetMediaFormat Method (String)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatManager_GetMediaFormat_1_bb3a7a4f.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/)

# FormatManager.GetMediaFormat Method (String)
 
Recognizes the media format by the specified file name.
 
**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 Shared Function GetMediaFormat ( _fileName As String _
) As Long
```
 
```csharp
public static long GetMediaFormat(string fileName
)
```
 
### Parameters
 
 - fileName
     - Type: [System.String](http://msdn2.microsoft.com/en-us/s1wwdcbf)
The name of the file to get a media format for.
 
### Return Value
A number that specifies the media format number. You can use static members [JpegFormat](https://www.graphicsmill.com/docs/gm5/F_Aurigma_GraphicsMill_Codecs_FormatManager_JpegFormat.htm.md), [TiffFormat](https://www.graphicsmill.com/docs/gm5/F_Aurigma_GraphicsMill_Codecs_FormatManager_TiffFormat.htm.md), and its siblings to compare it with.
   
## See Also

### Reference

- [FormatManager Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md)
- [GetMediaFormat Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Codecs_FormatManager_GetMediaFormat.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
