Remove unused code
This commit is contained in:
parent
af643b0388
commit
fc7bb33520
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue