#### [Board](https://docs.dev.board.fun/unity/api/index.html "index")

### [Board.Save](https://docs.dev.board.fun/unity/api/Board.Save.html "Board\.Save"). [ImageProcessor](https://docs.dev.board.fun/unity/api/ImageProcessor.html "Board\.Save\.ImageProcessor")

## ImageProcessor.ConvertToStandardizedPNG(Texture2D) Method

Converts a source texture to a standardized 432x243 PNG byte array for save game cover images.
The image will be scaled and cropped to maintain aspect ratio and exact dimensions.

```
public static byte[] ConvertToStandardizedPNG(Texture2D sourceTexture);
```

#### Parameters

`sourceTexture` [UnityEngine.Texture2D](https://learn.microsoft.com/en-us/dotnet/api/unityengine.texture2d "UnityEngine\.Texture2D")

The source texture to convert.

#### Returns

[System.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte "System\.Byte") [\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array "System\.Array")

PNG byte array of the processed cover image.

#### Exceptions

[System.ArgumentNullException](https://learn.microsoft.com/en-us/dotnet/api/system.argumentnullexception "System\.ArgumentNullException")

[sourceTexture](https://docs.dev.board.fun/unity/api/ImageProcessor.ConvertToStandardizedPNG(Texture2D).md#Board.Save.ImageProcessor.ConvertToStandardizedPNG(Texture2D).sourceTexture "Board\.Save\.ImageProcessor\.ConvertToStandardizedPNG\(Texture2D\)\.sourceTexture") is null.

[System.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception "System\.InvalidOperationException")

Scaling and encoding image process fails.
