---
title: "BitmapViewer Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_BitmapViewer.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/)

# BitmapViewer Class
 
This class represents scrollable viewport control.
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)
 
## Syntax
  
```
Public Class BitmapViewer _Inherits ViewerBase
```
 
```csharp
public class BitmapViewer : ViewerBase
```
 
## Remarks
  
This class is intended to display the image represented by the [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) object. It allows zooming and scrolling the displayed image. Also, you can add a rubberband rectangle (e.g. use it to select a portion of the image).
 
To set the image which should be displayed, use the [Bitmap](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_Bitmap.htm.md) property. You can either here assign an instance of the [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) class or call loading/creating methods of this class directly.
 
A number of members specifies the behavior of the image displaying.
 
- **[AutoUpdate](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_AutoUpdate.htm.md) property**when **true**, the control is automatically redrawn whenever the image stored in the [Bitmap](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_Bitmap.htm.md) property is changed.
- **[WorkspaceChanged](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_WinControls_ViewerBase_WorkspaceChanged.htm.md) event**fires when the image stored in the [Bitmap](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_Bitmap.htm.md) property is updated.
- **[ScaleToActualSize](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_ScaleToActualSize.htm.md) property**when **true**, the control takes into the account the resolution of the image. This way you will see the image in its physical size. Also you can properly handle situations when the horizontal and vertical resolutions are different (typical for fax images).
- **[AlphaEnabled](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_AlphaEnabled.htm.md) property**when **true**, and the image contains transparent or semi-transparent areas (alpha channel available), it is handled properly (alpha blending is used). Otherwise alpha channel is ignored. Alpha blending is working slower than common pixels copying, so it is recommended to disable this feature when it is not necessary.
- **[ColorManagementEngine](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_ColorManagementEngine.htm.md) property**when [LittleCms](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ColorManagementEngine.htm.md) the control uses the **LittleCMS** color management engine during displaying. When [AdobeCmm](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ColorManagementEngine.htm.md) the control uses the **Adobe CMM** color management engine during displaying. If the color management is disabled (the [ColorManagementEngine](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_ColorManagementEngine.htm.md) property is [None](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ColorManagementEngine.htm.md)) colors are displayed less accurate, but it working faster.
- **[Zoom](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Zoom.htm.md) property**when changed, the image is zoomed in (if [Zoom](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Zoom.htm.md) value is larger than 1) or out (if [Zoom](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Zoom.htm.md) is less than 1). Image also can be zoomed by the mouse wheel scrolled with the Shift button pressed. Also you can use [Navigator](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Navigator.htm.md) property to specify the behavior on the mouse clicks/move, including zoom in/out, or zooming the selected rectangle.
- **[ZoomQuality](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_BitmapViewer_ZoomQuality.htm.md) property**specifies the zooming quality.
- **[ZoomMode](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_ZoomMode.htm.md) property**specifies the zooming mode. It can be manual (when [Zoom](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Zoom.htm.md) property is specified manually) or automatic. In the automatic mode the zoom factor is calculated automatically (and you cannot change it until switch to the manual mode). Depending on the mode, it can zoom image to fit at the control without scroll bars ([BestFit](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ZoomMode.htm.md)), zoom to eliminate the horizontal scroll bar ([FitToWidth](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ZoomMode.htm.md)), etc.

If you want to add a selection on the image, you should use the [Rubberband](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_WinControls_ViewerBase_Rubberband.htm.md) property. You should assign here an instance of the [RectangleRubberband](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_RectangleRubberband.htm.md) class.
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [System.MarshalByRefObject](http://msdn2.microsoft.com/en-us/w4302s1f)
        - [System.ComponentModel.Component](http://msdn2.microsoft.com/en-us/9wbadbce)
            - [System.Windows.Forms.Control](http://msdn2.microsoft.com/en-us/36cd312w)
                - [Aurigma.GraphicsMill.WinControls.ViewerBase](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ViewerBase.htm.md)
                    - Aurigma.GraphicsMill.WinControls.BitmapViewer
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.WinControls_ObjectModel_83.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_BitmapViewer.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.WinControls_ObjectModel_84.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.WinControls_ObjectModel_81.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_INavigator.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill.WinControls_ObjectModel_82.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IRubberband.htm.md)
  
## See Also

### Reference

- [BitmapViewer Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_WinControls_BitmapViewer.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
