diff --git a/project/code/Images/GifDecoder.cs b/project/code/Images/GifDecoder.cs index bef5d1c..6431782 100644 --- a/project/code/Images/GifDecoder.cs +++ b/project/code/Images/GifDecoder.cs @@ -49,32 +49,6 @@ public class GifDecoder } } - private record GraphicsControl - { - public int TransparencyIndex; - - public GraphicsControl(BinaryReader reader) - { - var blockSize = reader.ReadByte(); - if (blockSize != 4) - { - throw new InvalidDataException($"Graphics Control block size should be 4. Found: {blockSize}"); - } - - // The only flag we care about is transparency - var flags = reader.ReadByte(); - var transparency = (flags & 0x1) != 0; - var delayTime = reader.ReadUInt16(); // I don't think thief uses any animated gifs so we'll ignore this :) - var rawTransparencyIndex = reader.ReadByte(); - TransparencyIndex = transparency ? rawTransparencyIndex : -1; - var terminator = reader.ReadByte(); - if (terminator != 0) - { - throw new InvalidDataException($"Graphics Control terminator should be 0. Found: {terminator}"); - } - } - } - public record ImageData { public int Width;