IImageTools.cs 720 B

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