-
Notifications
You must be signed in to change notification settings - Fork 602
Description
Description
I'm tying to resize large png/bmp image and save in jpeg. To get image i'm downloading it from azure blob. Default stream downloading chunk size is 4mb. When png is larger than 4mb it looks like image creates only for first 4mb, but image size is correct. When I'm copying blob stream into memory stream it works correctly. Even if I change default size of stream chunk for example into 50mb png/bmp images belove 50mb downloads correctly
Code
`
await using var image = await blobStorage.GetBlob(blobName, cancellationToken);
await using MemoryStream memoryStream = new();
await image.CopyToAsync(memoryStream, cancellationToken);
memoryStream.Seek(0, SeekOrigin.Begin);
using var originalImage = SKBitmap.Decode(memoryStream);
using var thumbnail = new SKBitmap(
_thumbnailOptions.Width,
_thumbnailOptions.Height,
originalImage.ColorType,
originalImage.AlphaType);
var sampling = new SKSamplingOptions(SKFilterMode.Linear, SKMipmapMode.Linear);
await using var thumbnailStorageStream = await blobStorage.OpenWrite(thumbnailName, "image/jpeg", cancellationToken);
var success =
originalImage.ScalePixels(thumbnail, sampling) &&
thumbnail.Encode(thumbnailStorageStream, SKEncodedImageFormat.Jpeg, quality: 100);`
Expected Behavior
Full data from stream reads into image
Actual Behavior
Only specific data length downloads into image for png/bmp
Version of SkiaSharp
3.116.0 (Current)
Last Known Good Version of SkiaSharp
2.88.9 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Linux, Windows
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status