SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.4k
stars
536
forks
source link
[BUG] RowBytes in Bitmap does not update after subset #2719
After subsetting a bitmap, the RowBytes in Bitmap remains unchanged at the initial bitmap size, The RowBytes in Bitmap.Info.RowBytes does get updated.
Code
//Perform subset of image
var srcRect = new SKRectI(10,10,50,50); // just for example
bitmap.ExtractSubset(output.Bitmap, srcRect);
Debug.Assert(bitmap.RowBytes == bitmap.Info.RowBytes);
Expected Behavior
I would expect the RowBytes to update after subsetting the image.
Actual Behavior
The RowBytes in Bitmap do not change.
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.88.2 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
All
Platform / Operating System Version
All
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Description
After subsetting a bitmap, the RowBytes in Bitmap remains unchanged at the initial bitmap size, The RowBytes in Bitmap.Info.RowBytes does get updated.
Code
Expected Behavior
I would expect the RowBytes to update after subsetting the image.
Actual Behavior
The RowBytes in Bitmap do not change.
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.88.2 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
All
Platform / Operating System Version
All
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct