---
title: "Bitmap..::.LoadThumbnail Method (String, Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Bitmap_LoadThumbnail_3_dc18a583.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 (String, Int32, Int32)
 
Loads the thumbnail from specified file 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 ( _fileName As String, _width As Integer, _height As Integer _
)
```
 
```csharp
public void LoadThumbnail(string fileName,int width,int height
)
```
 
### Parameters
 
 - fileName
     - Type: [System.String](http://msdn2.microsoft.com/en-us/s1wwdcbf)
Name of the 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
  
```
'Resize image proportionally to width not larger then 100
bitmap.LoadThumbnail("c:\Mountain.jpg", 100, 0)

'Resize image proportionally to height not larger then 100
'bitmap.LoadThumbnail("c:\Mountain.jpg", 0, 100)

'Resize image proportionally to fit in rectangle 100x100
'bitmap.LoadThumbnail("c:\Mountain.jpg", 100, 100)
```
 
```csharp
//Resize image proportionally to width not larger then 100
bitmap.LoadThumbnail(@"c:\Mountain.jpg", 100, 0);

//Resize image proportionally to height not larger then 100
//bitmap.LoadThumbnail(@"c:\Mountain.jpg", 0, 100);

//Resize image proportionally to fit in rectangle 100x100
//bitmap.LoadThumbnail(@"c:\Mountain.jpg", 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)
