mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
functional card/row edit and drag
This commit is contained in:
17
Serialization/SerialImage.cs
Normal file
17
Serialization/SerialImage.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Godot;
|
||||
|
||||
public class SerialImage
|
||||
{
|
||||
[JsonInclude]
|
||||
public byte[] DataWebp { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public StretchMode StretchMode { get; set; }
|
||||
public ImageWithMetadata ToImageWithMetadata()
|
||||
{
|
||||
var im = new Image();
|
||||
im.LoadWebpFromBuffer(DataWebp);
|
||||
return new(im, StretchMode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user