using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using RMuseum.Models.Artifact; using RSecurityBackend.Models.Generic; using RSecurityBackend.Models.Image; using System; using System.Drawing.Imaging; using System.IO; using System.Threading.Tasks; namespace RMuseum.Services { /// /// manipulating picture files /// public interface IPictureFileService { /// /// add new picture /// /// /// /// /// /// /// /// /// pass empty if you want a generic date based folder /// Task> Add ( string title, string description, int order, IFormFile file, string srcurl, Stream stream, string originalFileNameForStreams, string imageFolderName ); /// /// recover from files /// /// /// /// /// /// /// /// /// /// /// Task> RecoverFromeFiles ( string title, string description, int order, string srcurl, string orignalFilePath, string normalFilePath, string thumbFilePath, string originalFileNameForStreams, string imageFolderName ); /// /// returns image info /// /// /// Task> GetImage(Guid id); /// /// returns image file stream /// /// /// /// RServiceResult GetImagePath(RPictureFile image, string sz = "orig"); /// /// Rotate Image in 90 deg. multiplicants: 90, 180 or 270 /// /// /// /// Task> RotateImage(Guid id, int degIn90mul); /// /// Get Encoder /// /// /// ImageCodecInfo GetEncoder(ImageFormat format); /// /// Generate Cropped Image Based On ThumbnailCoordinates For Notes /// /// /// /// /// /// /// Task> GenerateCroppedImageBasedOnThumbnailCoordinates(Guid id, decimal left, decimal top, decimal width, decimal height); /// /// Image Storage Path /// string ImageStoragePath { get; } } }