Remove ImageSharp

This commit is contained in:
Jarrod Doyle 2024-09-01 18:50:33 +01:00
parent 5d958fd7ad
commit bf475ea21a
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 0 additions and 15 deletions

View File

@ -4,7 +4,4 @@
<EnableDynamicLoading>true</EnableDynamicLoading> <EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>ThiefMissionViewer</RootNamespace> <RootNamespace>ThiefMissionViewer</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
</ItemGroup>
</Project> </Project>

View File

@ -1,13 +1,10 @@
using Godot; using Godot;
using KeepersCompound.Images; using KeepersCompound.Images;
using SixLabors.ImageSharp.PixelFormats;
namespace KeepersCompound.TMV; namespace KeepersCompound.TMV;
public partial class TextureLoader public partial class TextureLoader
{ {
// TODO: Replace this with my own implementation lol
// TODO: Alpha!?
// References: // References:
// - https://www.w3.org/Graphics/GIF/spec-gif89a.txt // - https://www.w3.org/Graphics/GIF/spec-gif89a.txt
private static ImageTexture LoadGif(string path) private static ImageTexture LoadGif(string path)
@ -17,14 +14,5 @@ public partial class TextureLoader
var bytes = gifImage.GetRgbaBytes(); var bytes = gifImage.GetRgbaBytes();
var image = Image.CreateFromData(gifImage.Width, gifImage.Height, false, Image.Format.Rgba8, bytes); var image = Image.CreateFromData(gifImage.Width, gifImage.Height, false, Image.Format.Rgba8, bytes);
return ImageTexture.CreateFromImage(image); return ImageTexture.CreateFromImage(image);
// using var gifImage = SixLabors.ImageSharp.Image.Load<Rgba32>(path);
// var width = gifImage.Width;
// var height = gifImage.Height;
// var bytes = new byte[width * height * 4];
// gifImage.CopyPixelDataTo(bytes);
// var image = Image.CreateFromData(width, height, false, Image.Format.Rgba8, bytes);
// return ImageTexture.CreateFromImage(image);
} }
} }