Avalonia
Avalonia copied to clipboard
Added new optional parameter "quality" for IBitmap and IBitmapImpl.Save method
What does the pull request do?
This change allows for an optional quality parameter for saving Bitmap to a png file or stream. The parameter is interpreted by the backend implementations but typically ranges from 0..100. The parameter comes with a default value (null) which preserves the current behavior and is compatible with the current use.
What is the current behavior?
Bitmaps can only be stored with default quality.
What is the updated/expected behavior with this PR?
Bitmap.Save() can be used with and without quality parameter
How was the solution implemented (if it's not obvious)?
Changed interfaces IBitmap and IBitmapImpl to support the additional but optional parameter
Checklist
- [x] Added unit tests (if possible)? => unit tests already there
- [x] Added XML documentation to any related classes?
- [ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation
Breaking changes
- changed interface IBitmap
- changed interface IBitmapImpl
Both are extended in a compatible manner.
Obsoletions / Deprecations
n/a
Fixed issues
n/a
You can test this PR using the following package version. 11.0.999-cibuild0024334-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0024516-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0025081-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0025541-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0025611-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0025681-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]