forked from SDWebImage/SDWebImage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support decoding ISO HDR (avif/heic/jpeg-xl, etc) (SDWebImage#3778)
* Support HDR * Support HDR * When using SDWebImageProgressiveLoad and setting it to SDWebImageContextImageDecodeToHDR, it will be decoded to HDR only when loading is complete. * When SDImageIOAnimatedCoder turns on incremental, it does not need to be decoded to HDR when it is not completed * Sample image to remove sensitive information * 1、use remote resources for HDR testing 2、add simulator log for HDR * Support HDR encode * Support HDR encode * imageRef release error * HDR Decoded is not required for decoding, otherwise the type will be lost * HDR encode format * hdrImageRef not released correctly * HDR image must be lazy decode * HDR image must be lazy decode * JEPG HDR image must be lazy decode, otherwise it will crash * HDR, encoding properties add kCGImageDestinationEncodeToISOGainmap, compatible with SDR displays while preserving HDR * 支持 decode to HDR * HDR encoding is not currently supported * add UIImage.sd_isHighDynamicRange, use check UIImage is HDR * refactor: Do not hack on HEICS and distinguish static/aniamted image encoding UTI * refactor: Move cross-platform screen info into SDDeviceHelper * change: Do not disable force decode when turn on decodeToHDR Need actually check the HDR info of CGImage, or better, we can pre-decode to drop lazy HDR image * change: use UIImage.imageRendererFormat when force decode using graphics renderer This can inherit the possible info like dynamic range * fix: When decode HDR image to SDR, need specify the decode request Tested on macOS 14.5 and iOS 18.0 behavior * test: Added unit test for HDR decoding * demo: Update the macOS demo to show the HDR image * test: workaround the SDR decode on Simulator environment * change: The `sd_isHighDynamicRange` should check CGImage as fallback as well * test: temp disable a unused test case --------- Co-authored-by: DreamPiggy <lizhuoli1126@126.com>
- Loading branch information
1 parent
f3a1d91
commit f4f93c2
Showing
29 changed files
with
365 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.