# Sandbox.Bitmap.ToJpg

```csharp
byte[] ToJpg(int quality = 100)
```

Exports the bitmap as a JPEG byte array with the specified quality.

### Parameters

- `quality` (`int`), default `100`: The quality of the JPEG, between 0 and 100.

### Returns

`byte[]`: A byte array containing the JPEG image data.

Declared in [Sandbox.Bitmap](/api/Sandbox.Bitmap).
Assembly: `Sandbox.Engine`.
