---
title: "Bitmap..::.LoadThumbnail Method (Stream, Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Bitmap_LoadThumbnail_3_fbf43674.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/)

# Bitmap.LoadThumbnail Method (Stream, Int32, Int32)
 
Loads the thumbnail from specified [Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) on-the-fly.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub LoadThumbnail ( _stream As Stream, _width As Integer, _height As Integer _
)
```
 
```csharp
public void LoadThumbnail(Stream stream,int width,int height
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
 [Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) containing file to load.

 - width
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Width of the thumbnail bounding rectangle. You can pass 0 if you want method to find it automatically (see **Remarks** section for more details).

 - height
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Height of the thumbnail bounding rectangle. You can pass 0 if you want method to find it automatically (see **Remarks** section for more details).
 
## Remarks
  
If multiframe file is loaded, thumbnail for the first frame is taken.
 
*Width* and *height* arguments specify a rectangle to fit the thumbnail in. If you omit one of these arguments (set to 0) it will be calculated automatically to preserve aspect ratio. You cannot specify both arguments to 0 at once.
 
## Examples
  
```
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
bitmap.LoadThumbnail(stream, 100, 100)
```
 
```csharp
Aurigma.GraphicsMill.Bitmap bitmap = 
    new Aurigma.GraphicsMill.Bitmap();
bitmap.LoadThumbnail(stream, 100, 100);
```
   
## See Also

### Reference

- [Bitmap Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
- [LoadThumbnail Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Bitmap_LoadThumbnail.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
