You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We created an SKBitmap and drew a rectangle on it. The SKBitmap was then converted to an SKImage and subsequently to SKData. However, we encountered an issue while converting to SKData for specific formats such as BMP, GIF, ICO, WBMP, PKM, KTX, ASTC, DNG, HEIF, and AVIF. This issue does not occur when using formats such as JPG, PNG, and WEBP.
Platform: ASP.NET Core
Visual Studio Version: 2022
.NET Version: .NET 8
SkiaSharp Version: 2.88.8
But, you can also share a short block of code here:
publicvoidConvert(){// Example dimensionsintwidth=200;intheight=100;// Create a new SKBitmap instanceusing(varbitmap=newSKBitmap(width,height)){// Perform operations with the bitmap, such as drawingusing(varcanvas=newSKCanvas(bitmap)){// Example: draw a red rectanglecanvas.Clear(SKColors.White);// Clear with white backgroundusing(varpaint=newSKPaint()){paint.Color=SKColors.Red;canvas.DrawRect(newSKRect(50,20,150,80),paint);}}Streamstream=newMemoryStream();SKImageimage=SKImage.FromBitmap(bitmap);SKDatadata=image.Encode(SKEncodedImageFormat.Heif,100);data.SaveTo(stream);}}// some C# code here
You can also share some XAML:
<!-- xaml code here -->
Expected Behavior
The program should run without any exceptions in formats such as BMP, GIF, ICO, WBMP, PKM, KTX, ASTC, DNG, HEIF, and AVIF.
Actual Behavior
Get an exception in specific formats other than formats such as JPG, PNG, and WEBP.
Version of SkiaSharp
2.88.8 (Deprecated)
Last Known Good Version of SkiaSharp
2.88.8 (Deprecated)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
Windows 10
Devices
Dell 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 1.38 GHz
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Description
We created an SKBitmap and drew a rectangle on it. The SKBitmap was then converted to an SKImage and subsequently to SKData. However, we encountered an issue while converting to SKData for specific formats such as BMP, GIF, ICO, WBMP, PKM, KTX, ASTC, DNG, HEIF, and AVIF. This issue does not occur when using formats such as JPG, PNG, and WEBP.
Platform: ASP.NET Core
Visual Studio Version: 2022
.NET Version: .NET 8
SkiaSharp Version: 2.88.8
Code
The best way to share code for larger projects is a link to a GitHub repository: https://github.com/user/repo/tree/bug-123
But, you can also share a short block of code here:
You can also share some XAML:
<!-- xaml code here -->
Expected Behavior
The program should run without any exceptions in formats such as BMP, GIF, ICO, WBMP, PKM, KTX, ASTC, DNG, HEIF, and AVIF.
Actual Behavior
Get an exception in specific formats other than formats such as JPG, PNG, and WEBP.
Version of SkiaSharp
2.88.8 (Deprecated)
Last Known Good Version of SkiaSharp
2.88.8 (Deprecated)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
Windows 10
Devices
Dell 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 1.38 GHz
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct
The text was updated successfully, but these errors were encountered: