using System.Drawing; using Avalonia.Controls; namespace InABox.Avalonia.Platform { public class ImageFile(string filename, byte[]? data = null) { public string FileName { get; private set; } = filename; public byte[]? Data { get; set; } = data; } public interface IImageTools : ILoggable { byte[] CreateVideoThumbnail(byte[] video, int maxwidth, int maxheight); byte[] CreateThumbnail(byte[] image, int maxwidth, int maxheight); // Goal - to return a properly rotated, scaled and compressed JPEG Image Task CapturePhotoAsync(TopLevel window, int? compression, Size? constraints); Task PickPhotoAsync(TopLevel window, int? compression, Size? constraints); Task CaptureVideoAsync(TopLevel window); Task PickVideoAsync(TopLevel window); byte[] RotateImage(byte[] image, float angle, int quality = 100); byte[] ScaleImage(byte[] image, Size? constraints, int quality = 100); } }