#### Board

### Board.Save. ImageProcessor

## ImageProcessor.LoadTextureFromPNG(byte[]) Method

Converts a byte array containing PNG image data to a Texture2D.

```
public static Texture2D LoadTextureFromPNG(byte[] pngBytes);
```

#### Parameters

`pngBytes` [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")

The PNG image data as bytes.

#### Returns

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

A [UnityEngine.Texture2D](https://learn.microsoft.com/en-us/dotnet/api/unityengine.texture2d "UnityEngine.Texture2D") containing the loaded image if successful; otherwise `null`.
