---
title: "WbmpWriter Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WbmpWriter.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/)

# WbmpWriter Class
 
This class enables you to write WBMP images.
 
**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 NotInheritable Class WbmpWriter _Inherits FormatWriter
```
 
```csharp
public sealed class WbmpWriter : FormatWriter
```
 
## Remarks
  
WBMP file format is defined in WAP (Wireless Application Protocol) specification and designed for use with applications that operate over wireless communication networks. It is one of the first standard image formats supported by cellular phones. This format is extremely simple: WBMP file can contain only one 1-bit (black-and-white) image.
 
## Examples
  
This sample demonstrates how to convert a JPEG image into the WBMP. Draw attention, to be able to save to the WBMP format, we need to reduce colors to 1-bit color depth first.
 
```
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\Mountain.jpg")

bitmap.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.Bicolor, _
    Nothing)

Dim writer As New Aurigma.GraphicsMill.Codecs.WbmpWriter("C:\Mountain.wbmp")

Dim frame As New Aurigma.GraphicsMill.Codecs.WbmpFrame

frame.SetBitmap(bitmap)

bitmap.Dispose()

writer.AddFrame(frame)

frame.Dispose()

writer.Dispose()
```
 
```csharp
using (Aurigma.GraphicsMill.Bitmap bitmap = 
           new Aurigma.GraphicsMill.Bitmap(@"c:\Mountain.jpg"))
{
    bitmap.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.Bicolor, 
        null);

    using (Aurigma.GraphicsMill.Codecs.WbmpWriter writer = 
        new Aurigma.GraphicsMill.Codecs.WbmpWriter())
    {            
        using (Aurigma.GraphicsMill.Codecs.WbmpFrame frame = 
                   new Aurigma.GraphicsMill.Codecs.WbmpFrame())
        {
            frame.SetBitmap(bitmap);

            writer.AddFrame(frame);
        }
    }
}
```
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.SyncHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
        - [Aurigma.GraphicsMill.Codecs.FormatWriter](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatWriter.htm.md)
            - Aurigma.GraphicsMill.Codecs.WbmpWriter
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_210.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_WbmpWriter.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_107.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IEncoderOptions.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_108.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_IFrame.htm.md)
 
## Supported Pixel Formats

| Member Name | Description |
| --- | --- |
| **Format1bppIndexed** | 1 bit per pixel. Indexed. |
 
## See Also

### Reference

- [WbmpWriter Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_WbmpWriter.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
