I encoded a tex2D into png by the pixel array is correct But after EncodeToPNG,the byte array "data" was null ...