---
title: "Bitmap..::.MemoryUsed Property "
canonical: https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Bitmap_MemoryUsed.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.MemoryUsed Property 
 
Returns a number of bytes occupied with pixels of this [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public ReadOnly Property MemoryUsed As Integer
```
 
```csharp
public int MemoryUsed { get; }
```
 
### Property Value
A number of bytes occupied with pixels of this [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md).
 
## Remarks
 You can use this value to allocate a buffer which should hold a copy of pixels of this [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md).
 
## Examples
  
```
Console.WriteLine(" Memory Used: " & bitmap.MemoryUsed)
```
 
```csharp
Aurigma.GraphicsMill.BitmapData bitmapData = bitmap.LockBits();

Console.WriteLine(" Memory Used: " + bitmapData.Height * bitmapData.Stride);

bitmap.UnlockBits(bitmapData);
```
   
## See Also

### Reference

- [Bitmap Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
