MagicScaler 0.14.1
MagicScaler v0.14.1
Important: All previous codec plugin packages are incompatible with this new release. New versions of all codec plugins are available, as detailed below. Make sure you have the "include prerelease" checkbox checked if using the NuGet Package Manager UI to update.
Fixes
- Fixed a bug in the validation of frame ranges when using a decoder supporting
IMultiFrameDecoderOptions
#151 - Fixed an issue that prevented WIC codecs from decoding an image when the image did not start at the beginning of an input
Stream
. - Fixed possible incorrect DPI when mixing a WIC encoder with native plugin decoders using resolution units other than inches.
Behavioral Changes
- Pipelines created with
MagicImageProcessor.BuildPipeline
no longer force conversion to sRGB by default. You can use theColorPofileMode.ConvertToSrgb
setting to force the old behavior if necessary. - Little-CMS is no longer used opportunistically by default on Windows. Some users were confused by DLL load failures showing up in the debugger since
lcms2.dll
does not ship in the package. #128 - Referencing MagicScaler from a project using a .NET
TargetFramework
version that is no longer supported will now generate a warning. Because MagicScaler ships with anetstandard2.1
binary, it will still work on these platforms, but it will use non-hardware-accelerated fallback code. The warning makes it clear when this is happening and can be disabled if necessary.
Native Codec Previews
- Improved handling of exceptions on managed <-> native transitions on Linux. Previously, an exception thrown in a managed callback from a native codec would result in a generic failure message. Now, the managed exception context is preserved, and the proper exception is thrown on return from the native code.
- Improved handling of truncated or corrupted images in all native decoders (particularly GIF and PNG). The decoders will now decode as much of the image as they are able and will return empty pixels for the remainder. #108 #140
- WebP
- Fixed an issue that resulted in misaligned subframes in some lossy animated WebP output.
- Fixed an issue that resulted in some pixels not clearing to fully transparent in some lossy animated WebP output.
- HEIF
- Updated
libheif
and its frame decoders (libde265
anddav1d
) to the latest versions. - Included some additional
ftyp
signatures that may be found in valid HEIC/AVIF files. - Mitigated a possible access violation on images that decode to a different size than initially reported on header read, due to inconsistent handling of transform boxes in
libheif
strukturag/libheif#1131. These cases will now return a decode error.
- Updated
- JPEG
- Updated
libjpeg-turbo
to latest version. - Reduced managed allocations in the decoder.
- Updated
- PNG
- Updated
libpng
to latest version. - Relaxed some validation in the decoder. #139
- Updated
- GIF
- Updated
GIFLIB
to latest version.
- Updated
- JPEG XL
Performance Improvements
- Fixed a performance regression introduced by Intel's Gather Data Sampling ('Downfall') vulnerability mitigations, by disabling Gather for simple LUT mappings. With the microcode patch active, Gather performance is very significantly reduced (on the order of 4-5x slower). If you are running in an environment where mitigations are disabled, setting the
PhotoSauce.MagicScaler.GdsMitigationsDisabled
AppContext switch, will restore the Gather-based implementations.
API Additions
PlanarEncoderInfo
is now public, for use in configuring defaults for JPEG and WebP encoders. #133- Added new
IIccColorProfileSource
andIExifSource
metadata interfaces to allow codec authors to make this metadata available to the MagicScaler pipeline. - Added a new
TransformFactory
class in thePhotoSauce.MagicScaler.Experimental
namespace, which allows for advanced use of some of MagicScaler's internal transform implementations. This API was added specifically to support Paint.NET, and as the namespace implies, it is experimental and subject to change on a whim. If anyone else finds the experimental features useful, please speak up in a discussion, or risk losing them.
WebRSize v0.6.9
- Updated to use MagicScaler v0.14.1