MagicScaler v.0.11.0.0
Animated GIF support is finally here!
Huge thanks to Carbonmade for sponsoring the work on the new GIF features
MagicScaler v0.11.0
Breaking Changes
- Changed minimum .NET Framework version to 4.6.1 (from 4.6). This is the lowest version that technically supports .NET Standard 2.0, and Microsoft has stopped updating some of their OOB packages for older versions. Microsoft NuGet dependencies were also updated to the latest versions supported by 4.6.1. This should reduce the number of version conflicts such as #48 and #36
- Running MagicScaler on an STA thread, such as the UI thread in a WinForms or WPF app, is no longer supported and will throw an exception. This was always discouraged for performance reasons, but the new animated GIF support requires the WIC GIF codec's MTA behavior, so it is now forbidden. The best solution is to use
Task.Run
to invoke MagicScaler on a background thread. - Removed the previously obsoleted
GammaMode.sRGB
. The removed value is replaced byGammaMode.Companded
. - Obsoleted the
BuildPipeline
overload that acceptsReadOnlySpan<byte>
. This was previously mentioned in #38
Behavioral Changes
- An animated GIF source will now result in an animated GIF output if the
SaveFormat
setting isFileFormat.Auto
orFileFormat.Gif
andFrameIndex
is set to0
. In previous versions, only a single frame of an animated GIF could be selected for output. #40 - Source images with a wide-gamut color profile will now result in a wide-gamut output under the default
ColorProfileMode.Normalize
setting. The old behavior of normalizing all images to sRGB can be re-enabled withColorProfileMode.ConvertToSrgb
if you are dealing with non-color-aware downstream software. More details are given in #51 - Color profile validation has been slightly relaxed. The wacky ICC profile that caused the Android crashes that made news recently was ignored by previous MagicScaler versions but will now correctly convert to a safe wide-gamut profile under the default
ColorProfileMode
. CropScaleMode.Max
andCropScaleMode.Contain
now work with0
width or height. Previously both width and height had to be set for all modes other thanCropScaleMode.Crop
. #52 #43
Performance Improvements
- Improved speed across the library and further reduced GC allocations for common resizing tasks.
Quality Improvements
- Replaced WIC palette generation and dithering for indexed color formats with a much higher quality internal implementation. The improvements apply to both GIF and PNG8 output.
WebRSize v0.6.0
Changes
- Updated to use MagicScaler v0.11.0
- The minimum supported .NET Framework version is now 4.6.1
- Fixed a bug that caused the 404 (not found) handler to error instead of returning a placeholder image