ImageProcessor.ConvertToStandardizedPNG(Texture2D) - Board Docs
Board
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
The source texture to convert.
Returns
PNG byte array of the processed cover image.
Exceptions
sourceTexture is null.
System.InvalidOperationException
Scaling and encoding image process fails.