摘要:
//压缩字节 //1.创建压缩的数据流 //2.设定compressStream为存放被压缩的文件流,并设定为压缩模式 //3.将需要压缩的字节写到被压缩的文件流 public static byte[] CompressBytes(byte[] bytes) { using (MemoryStre 阅读全文
摘要:
private Texture2D TextureToTexture2D(Texture texture) { Texture2D texture2D = new Texture2D(texture.width, texture.height, TextureFormat.RGBA32, false 阅读全文
摘要:
public static byte[] Color32ArrayToByteArray(Color32[] colors) { if (colors == null || colors.Length == 0) return null; int lengthOfColor32 = Marshal. 阅读全文