Remove unused code

This commit is contained in:
Jarrod Doyle 2024-09-08 07:17:10 +01:00
parent af643b0388
commit fc7bb33520
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 0 additions and 26 deletions

View File

@ -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 record ImageData
{ {
public int Width; public int Width;