12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System.Drawing;
- using InABox.Core;
- using Microsoft.Maui.Storage;
- namespace InABox.Avalonia.Platform;
- public class DefaultImageTools : IImageTools
- {
- public Logger? Logger { get; set; }
- public byte[] CreateVideoThumbnail(byte[] video, int maxwidth, int maxheight)
- {
- Logger?.Error("CreateVideoThumbnail() is not implemented on this platform");
- return video;
- }
- public byte[] CreateThumbnail(byte[] image, int maxwidth, int maxheight)
- {
- Logger?.Error("CreateThumbnail() is not implemented on this platform");
- return image;
- }
- public Task<FileResult> CapturePhotoAsync(int? compression, Size? constraints)
- {
- Logger?.Error("CapturePhotoAsync() is not implemented on this platform");
- return Task.Run(() => new FileResult($"{Guid.NewGuid().ToString()}.tmp"));
- }
- public Task<FileResult> PickPhotoAsync(int? compression, Size? constraints)
- {
- Logger?.Error("PickPhotoAsync() is not implemented on this platform");
- return Task.Run(() => new FileResult($"{Guid.NewGuid().ToString()}.tmp"));
- }
- public byte[] RotateImage(byte[] image, float angle, int quality = 100)
- {
- Logger?.Error("RotateImage() is not implemented on this platform");
- return image;
- }
- public byte[] ScaleImage(byte[] image, Size? constraints, int quality = 100)
- {
- Logger?.Error("ScaleImage() is not implemented on this platform");
- return image;
- }
- }
|