We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The overload of SKPixmap
SKPixmap
public bool Encode(Stream dst, SKEncodedImageFormat encoder, int quality)
is producing a black bar that is cropping the bottom part, but when i use this overload
public SKData Encode(SKEncodedImageFormat encoder, int quality)
and manually save the SKData its fine without cropping the bottom part.
SKData
It might have been a SKManagedWStream issue.
SKManagedWStream
var pxs = Marshal.AllocHGlobal(skInfo.BytesSize); var bmp2 = new SKPixmap(skInfo.WithSize(640, 640), pxs); image.ScalePixels(bmp2, SKSamplingOptions.Default); bmp2.Encode(File.Create("save2.png"), SKEncodedImageFormat.Png, 100); var enc = bmp2.Encode(SKEncodedImageFormat.Png, 100); var f = File.Create("save3.png"); enc.SaveTo(f);
No black bar just like save3.png
save3.png
Produces a black bar at the bottom for save2.png
save2.png
3.116.0 (Current)
Visual Studio (Windows)
Windows
No response
The text was updated successfully, but these errors were encountered:
As I was writing this issue, I realized it has different behavior when uploaded to github. Notice the bottom part.
Sorry, something went wrong.
No branches or pull requests
Description
The overload of
SKPixmap
is producing a black bar that is cropping the bottom part, but when i use this overload
and manually save the
SKData
its fine without cropping the bottom part.It might have been a
SKManagedWStream
issue.Code
Expected Behavior
No black bar just like
save3.png
Actual Behavior
Produces a black bar at the bottom for
save2.png
Version of SkiaSharp
3.116.0 (Current)
Last Known Good Version of SkiaSharp
3.116.0 (Current)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
Save2.png
save2.png
Save3.png
save3.png
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: