PosNullByte() public static method

Finds position of null byte in array
public static PosNullByte ( byte bytes ) : int
bytes byte
return int
Beispiel #1
0
        public override void ParseFromRaw(ChunkRaw chunk)
        {
            int num = ChunkHelper.PosNullByte(chunk.Data);

            profileName = PngHelperInternal.charsetLatin1.GetString(chunk.Data, 0, num);
            if ((chunk.Data[num + 1] & 0xFF) != 0)
            {
                throw new Exception("bad compression for ChunkTypeICCP");
            }
            int num2 = chunk.Data.Length - (num + 2);

            compressedProfile = new byte[num2];
            Array.Copy(chunk.Data, num + 2, compressedProfile, 0, num2);
        }