Remove unused debug prints
This commit is contained in:
parent
f6e35f5b7a
commit
354155db20
|
@ -35,11 +35,9 @@ public class GifDecoder
|
||||||
LogicalScreenHeight = reader.ReadUInt16();
|
LogicalScreenHeight = reader.ReadUInt16();
|
||||||
var flags = reader.ReadByte();
|
var flags = reader.ReadByte();
|
||||||
HasGlobalColorTable = ((flags >> 7) & 0x1) != 0;
|
HasGlobalColorTable = ((flags >> 7) & 0x1) != 0;
|
||||||
// Godot.GD.Print($"HALLO WE HAVE GLOBAL TABLE? {HasGlobalColorTable}");
|
|
||||||
BitsPerColorChannel = (byte)(((flags >> 4) & 0x7) + 1);
|
BitsPerColorChannel = (byte)(((flags >> 4) & 0x7) + 1);
|
||||||
IsGlobalColorTableSorted = ((flags >> 3) & 0x1) != 0;
|
IsGlobalColorTableSorted = ((flags >> 3) & 0x1) != 0;
|
||||||
GlobalColorTableSize = (int)Math.Pow(2, (flags & 0x7) + 1);
|
GlobalColorTableSize = (int)Math.Pow(2, (flags & 0x7) + 1);
|
||||||
// Godot.GD.Print($"Global colour size? {GlobalColorTableSize}");
|
|
||||||
BackgroundColorIndex = reader.ReadByte();
|
BackgroundColorIndex = reader.ReadByte();
|
||||||
var rawAspectRatio = reader.ReadByte();
|
var rawAspectRatio = reader.ReadByte();
|
||||||
if (rawAspectRatio == 0)
|
if (rawAspectRatio == 0)
|
||||||
|
@ -141,7 +139,6 @@ public class GifDecoder
|
||||||
compressedBytes.AddRange(bytes);
|
compressedBytes.AddRange(bytes);
|
||||||
blockSize = reader.ReadByte();
|
blockSize = reader.ReadByte();
|
||||||
}
|
}
|
||||||
// Godot.GD.Print($"End of image data: {reader.BaseStream.Position}");
|
|
||||||
|
|
||||||
using MemoryStream compressedStream = new(compressedBytes.ToArray());
|
using MemoryStream compressedStream = new(compressedBytes.ToArray());
|
||||||
using BinaryReader compressedReader = new(compressedStream, Encoding.UTF8, false);
|
using BinaryReader compressedReader = new(compressedStream, Encoding.UTF8, false);
|
||||||
|
@ -181,7 +178,6 @@ public class GifDecoder
|
||||||
}
|
}
|
||||||
else if (code == endCode)
|
else if (code == endCode)
|
||||||
{
|
{
|
||||||
// Godot.GD.Print($"CompressedBytesLeft: {compressedReader.BaseStream.Length - compressedReader.BaseStream.Position}");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (code < codeCount)
|
else if (code < codeCount)
|
||||||
|
@ -313,8 +309,6 @@ public class GifDecoder
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Godot.GD.Print($"Decoding image at: {path}");
|
|
||||||
|
|
||||||
using MemoryStream stream = new(File.ReadAllBytes(path));
|
using MemoryStream stream = new(File.ReadAllBytes(path));
|
||||||
using BinaryReader reader = new(stream, Encoding.UTF8, false);
|
using BinaryReader reader = new(stream, Encoding.UTF8, false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue