MagicScaler 0.9.0.0
saucecontrol
released this
16 Aug 02:15
·
267 commits
to master
since this release
MagicScaler 0.9.0
NOTE: This version contains breaking changes to the API. While your code will most likely not require changes, you will have to rebuild when upgrading. Details below...
Breaking Changes
- Changed
IPixelSource
to acceptSpan<byte>
arguments rather thanIntPtr
and size. This will require code changes to anything consuming raw pixel data from aProcessingPipeline
and to customIPixelSource
andIPixelTransform
implementations. - Changed
ArraySegment<byte>
arguments toReadOnlySpan<byte>
throughout the public API surface. The built-in implicit conversions should make the change seamless. - Changed the name of
BlendingMode.sRGB
toBlendingMode.Companded
. This reflects the fact that pixels may be kept in their original colorspace, which may or may not be sRGB. The old value is still present but is deprecated. - Changed the namespace of the
System.Drawing
-compatibleColor
class fromSystem.Drawing.Temp
toSystem.Drawing.ColorShim
. This only affectsnetcoreapp1.x
andnetstandard1.x
targets, which are missingSystem.Drawing.Color
from their versions of theSystem.Drawing.Primitives
NuGet package. - Added a
netstandard2.0
target, which usesSystem.Drawing.Color
rather than the compatibility shim. This change should be seamless but may require removing ausing
statement.
Fixes
- Fixed "Unupported pixel format" error when processing greyscale images in sRGB/Companded blending mode.
Performance and Image Quality Improvements
- Removed dependency on the Windows Color System for conversion between RGB color spaces based on embedded ICC profiles. The internal MagicScaler implementation is more accurate and significantly faster. Aditionally, conversion to Linear RGB is now defined by the embedded profile, improving quality for images with color spaces that differ significantly from sRGB.
- Improved recognition of sRGB-compatible ICC profiles. These profiles are upgraded on the fly to MagicScaler's internal (more accurate) sRGB definition, meaning fewer unnecessary conversions. Previously only the HP/Microsoft sRGB profile was recognized.
- Added support for greyscale profile conversions. Windows has no default greyscale profile, so these were previously ignored.
- Added hybrid scaling support for CMYK images. Because correct CMYK->RGB conversion is very expensive, this can have significant performance advantages for CMYK TIFF input (hybrid scaling already worked with CMYK/YCCK JPEG).
- Eliminated unnecessary format conversion when the pipeline contains no convolution or color conversion steps.
- Added support for the new Vector conversion JIT Intrinsics in .NET Core 2.1 and .NET Framework 4.7.2, improving SIMD pipeline performance further on these platforms. Note that your project must target these newer runtimes directly in order to take advantage of the improvement.
- Improved performance of the
ColorMatrixTransform
filter. This was previously included as an example of how to implement anIPixelTransform
but is now used internally. - Improved convolution quality for partially-transparent pixels when using the non-SIMD pipeline.
- Improved precision for intermediate convolution values in the non-SIMD pipeline, bringing its accuracy extremely close to the floating point (SIMD) version.
Feature Additions and Updates
- Added
CropScaleMode.Pad
, which preserves the input image aspect ratio and fills undefined pixels in the output rectangle withMatteColor
. - Added support for semi-transparent
MatteColor
values. Previously, the alpha value was forced tobyte.MaxValue
. - Modified the matte processor so that output is converted BGRA->BGR if
MatteColor
has no transparency. Previously in such cases, the alpha channel was preserved even though all pixels were opaque. - Added
OrientationMode
setting to allow overriding default orientation correction behavior. #12 - Added
ColorProfileMode
setting to allow overriding default ICC color profile handling. #13 - Added a
FormatConversionTransform
filter to allow for predictable output pixel format when accessing a pipeline'sIPixelSource
. #20 - Added a
GaussianBlurTransform
filter. #10 - Added
ProcessImageSettings.Calculate(ProcessImageSettings, ImageFileInfo)
, which returns the calculated settings that would be used for a given input image. #17 - Added support for modifying transparency with the
ColorMatrixTransform
filter. Previously, the alpha channel passed through the filter untouched. - Added XML documentation to the NuGet package.
WebRSize 0.3.3
- Updated to use MagicScaler 0.9.0