---
title: "FormatManager..::.GetMediaFormat Method (Stream)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_FormatManager_GetMediaFormat_1_bca7c9fe.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 (Stream)
 
Recognizes the media format by the specified stream.
 
**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 ( _stream As Stream _
) As Long
```
 
```csharp
public static long GetMediaFormat(Stream stream
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
The stream 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)
