What's Changed
- Add
AssetType/utTypeandAssetType/init(_:)for bridging to and fromUTType - Add
AssetType/bmp,AssetType/tiff,AssetType/jpeg2000, andAssetType/jxl. Image I/O decodes these formats, butAssetType/init(_:)didn't recognize them, soImageContainer/typewasnil - Fix
AssetType/init(_:)detecting GIF from the first three bytes instead of the completeGIF87a/GIF89asignature, which kept the original data in the memory cache for the files that merely started withGIF - Fix
AssetType/webp,AssetType/mp4,AssetType/m4v, andAssetType/movusing the identifiers that the system doesn't declare, so they didn't bridge to aUTType - Fix MP4 files with the standard
mp42major brand being detected asAssetType/m4v - Detect the ISO base media types from the major brand in the
ftypbox, which adds the remaining MP4, M4V, and HEIC brands - Fix progressive image downloads not completing when
isResetEnabledistrueonLazyImageViewby @nathantannar4 in #884 - Fix
ImagePipeline.Cache.storeCachedImage(_:for:caches:)storing image previews in the disk cache, so a progressive scan passed to it was later delivered as a completed image – #885 - Fix
ImageProcessors.Resizeignoringupscalewhencropistrue, which enlarged the image beyond its native resolution – #886 - Fix the
fileanddataURL schemes being matched case-sensitively, soFILE:///…andData:…URLs skipped the local resource fast path and had their contents copied into the data cache – #887 - Fix a crash when resizing an image to a non-finite size.
CGContextcreation converted the dimensions withInt(_:), which traps on NaN and infinity – #888 - Fix
ImageDecoders/Defaultgenerating GIF previews even when the preview policy isImagePipeline/PreviewPolicy/disabled– #892 - Fix
ImageProcessors/GaussianBlurblurring the image with a radius of0or less instead of returning it unchanged. The radius was clamped to a minimum of2, so every radius in0...2also rendered identically under different cache keys – #893 - Fix
ImageProcessingOptions/Borderproducing the same identifier for every color with no sRGB representation, e.g. a pattern color. The components are now also clamped to0...1, which used to produce malformed hex for wide-gamut colors on iOS – #891 - Fix progressive previews being silently dropped for the rest of the task's lifetime when the cached data fails to decode and the task falls back to loading the image – #894
- Fix
DataLoader/delegatenever receivingurlSession(_:didCreateTask:)on macOS and Mac Catalyst, where the forwarding was compiled out – #895 - Fix
ImageProcessors/GaussianBlurtagging opaque images with an alpha channel, which madeImageEncoders/Defaultencode blurred photos as PNG instead of JPEG or HEIC – #896 - Fix an outstanding progressive decoding or processing operation not being cancelled when a task fails, leaving it to occupy a queue slot and hold on to the decoded preview until the queue drained past it – #898
- Fix a late image response reaching the memory cache after its task had already ended, letting a stale progressive scan overwrite the entry – #898
New Contributors
- @nathantannar4 made their first contribution in #884
Full Changelog: 13.1.0...13.2.0