Version: 2020.1
public static byte[] EncodeToJPG (Texture2D tex, int quality);
public static byte[] EncodeToJPG (Texture2D tex);


tex Text texture to convert.
quality 1..100(デフォルト75)でエンコードする JPG の画質


テクスチャを JPG 形式にエンコードします

The returned byte array is the JPG "file". You can write them to disk to get the JPG file, send them over the network, etc.

This function works only on uncompressed, non-HDR texture formats. You must enable the texture's Read/Write Enabled flag in the Texture Import Settings. The encoded JPG data will have no alpha channel.

関連項目: EncodeToPNG.