public async Task <long> ResizeBlobAsync(long tenantId, long sourceBlobId, string path, ResizeOptions options) { Blob blob = await _storageRepository.ReadBlobAsync(tenantId, sourceBlobId); Stream imageStream = await _blobService.ReadBlobContentAsync(blob); blob.Path = path; Stream resizedImageStream = _imageAnalysisService.ResizeImage(imageStream, options); IBlobContent content = new BlobContent { Name = blob.Name, Type = blob.ContentType, Stream = resizedImageStream }; return(await CreateBlobAsync(tenantId, content)); }
public async Task <long> ResizeBlobAsync(long tenantId, long sourceBlobId, string path, ResizeOptions options) { Blob blob = await _storageRepository.ReadBlobAsync(tenantId, sourceBlobId); Stream imageStream = await _blobService.ReadBlobContentAsync(blob); blob.Path = path; Stream resizedImageStream = _imageService.ResizeImage(imageStream, options); return(await CreateBlobAsync(tenantId, blob, resizedImageStream)); }