# Sandbox.Bitmap.ToFormat

```csharp
byte[] ToFormat(ImageFormat format)
```

Exports the bitmap to the specified engine format

### Parameters

- `format` (`ImageFormat`): The target image format to encode to.

### Returns

`byte[]`

Declared in [Sandbox.Bitmap](/api/Sandbox.Bitmap).
Assembly: `Sandbox.Engine`.
