1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System.Drawing;
- using Avalonia.Controls;
- 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<ImageFile?> CapturePhotoAsync(TopLevel window, int? compression, Size? constraints)
- {
- Logger?.Error("CapturePhotoAsync() is not implemented on this platform");
- return Task.FromResult<ImageFile?>(null);
- }
- public Task<ImageFile?> PickPhotoAsync(TopLevel window, int? compression, Size? constraints)
- {
- Logger?.Error("PickPhotoAsync() is not implemented on this platform");
- return Task.FromResult<ImageFile?>(null);
- }
-
- public Task<ImageFile?> CaptureVideoAsync(TopLevel window)
- {
- Logger?.Error("CapturePhotoAsync() is not implemented on this platform");
- return Task.FromResult<ImageFile?>(null);
- }
- public Task<ImageFile?> PickVideoAsync(TopLevel window)
- {
- Logger?.Error("PickPhotoAsync() is not implemented on this platform");
- return Task.FromResult<ImageFile?>(null);
- }
- 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;
- }
- }
|