IImageTools.cs 717 B

123456789101112131415161718192021
  1. using System.Drawing;
  2. using Microsoft.Maui.Storage;
  3. namespace InABox.Avalonia.Platform
  4. {
  5. public interface IImageTools : ILoggable
  6. {
  7. byte[] CreateVideoThumbnail(byte[] video, int maxwidth, int maxheight);
  8. byte[] CreateThumbnail(byte[] image, int maxwidth, int maxheight);
  9. // Goal - to return a properly rotated, scaled and compressed JPEG Image
  10. Task<FileResult> CapturePhotoAsync(int? compression, Size? constraints);
  11. Task<FileResult> PickPhotoAsync(int? compression, Size? constraints);
  12. byte[] RotateImage(byte[] image, float angle, int quality = 100);
  13. byte[] ScaleImage(byte[] image, Size? constraints, int quality = 100);
  14. }
  15. }