public async Task <JsonResult> DimAsync(FullPath path) { using var stream = new FileStream(path.File.FullName, FileMode.Open); var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream)); return(await Json(response)); }
public async Task <JsonResult> Dim(string target) { FullPath path = ParsePath(target); DimResponseModel response = new DimResponseModel(path.Root.GetImageDimension(path.File)); return(await Json(response)); }
public async Task <JsonResult> DimAsync(FullPath path) { using (var stream = await AzureStorageAPI.FileStreamAsync(path.File.FullName)) { var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream)); return(await Json(response)); } }
public Task <ConnectorResult> DimAsync(FullPath path) { using (var stream = new FileStream(path.File.FullName, FileMode.Open)) { var response = new DimResponseModel(path.RootVolume.PictureEditor.ImageSize(stream)); return(Task.FromResult(new ConnectorResult(response))); } }