dev: Updated image library

This commit is contained in:
Kwoth
2024-09-04 06:55:59 +00:00
parent e56190e9da
commit e85e7c49cb
9 changed files with 57 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ namespace NadekoBot.Common.JsonConverters;
public class Rgba32Converter : JsonConverter<Rgba32>
{
public override Rgba32 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
=> Rgba32.ParseHex(reader.GetString());
=> Rgba32.ParseHex(reader.GetString()!);
public override void Write(Utf8JsonWriter writer, Rgba32 value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.ToHex());

View File

@@ -24,7 +24,7 @@ public static class Rgba32Extensions
using var frame = imgArray[i].Frames.CloneFrame(frameNumber % imgArray[i].Frames.Count);
var offset = xOffset;
imgFrame.Mutate(x => x.DrawImage(frame, new Point(offset, 0), new GraphicsOptions()));
xOffset += imgArray[i].Bounds().Width;
xOffset += imgArray[i].Bounds.Width;
}
}