29 Commits
Author SHA1 Message Date
DreamPiggy 9b87ae4602 Fix the query thumbnail logic after refactory 2026-02-06 22:36:32 +08:00
DreamPiggy 92a7ab93e0 Support decoding ISO HDR (avif/heic/jpeg-xl, etc) (#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>
2025-02-20 22:06:47 +08:00
DreamPiggy 41dc9bef7b Added animationTransformer on SDAnimatedImageView
This allows the animated image to apply post-transform

Currently we don't change the old `SDWebImageTransformAnimatedImage` behavior. This feature is opt-in
2024-10-19 23:45:26 +08:00
DreamPiggy e1c01fe28b Introduce SDImageForceDecodePolicy, which can controls whether to force-decode using automatic check, always or never
Deprecate the `SDWebImageAvoidDecodeImage`

This can help for some user who don't use ImageIO and need to ensure the memory footprint
2023-07-13 22:58:32 +08:00
DreamPiggy 91162ce5dc Update the example with new SDWebImageScaleDownLargeImages 2023-05-15 17:34:38 +08:00
DreamPiggy d1be404b63 Remove the untracked DS_Store file 2019-11-22 16:16:20 +08:00
zxiou fe0e42afc2 fix the core render of SDAnimatedImagePlayer and fix assignment animationRepeatCount does not work
Signed-off-by: zxiou <zhangxu6@xiaomi.com>
2019-11-21 19:17:44 +08:00
DreamPiggy aa3d2225db Update the example with toggle animation button 2019-11-05 20:50:13 +08:00
Bogdan Poplauschi 64123734c3 Move webp component (and libwebp dependency) to SDWebImage/SDWebImageWebPCoder
- move the webp component + the libwebp dependency to SDWebImage/SDWebImageWebPCoder (including tests and demo)
- Xcode 9.4
- instead of directly linking the Demos to the frameworks, using CocoaPods (`Examples/Podfile`). This allows using SDWebImage/SDWebImageWebPCoder into our examples so we keep the WebP demos
- demos code cleanup and warnings resolved
- all links from docs (README, Migration guide, CHANGELOG) are full links, so they work even from external pages (i.e. https://cocoapods.org/pods/SDWebImage).
- added "Additional modules" section to README
2018-09-07 12:40:25 +03:00
DreamPiggy e9cf356e57 Renaming SDWebImageProgressiveDownload to SDWebImageProgressiveLoad. Which is more suitable for custom loader which also support progressive image loading. (No need to be download) 2018-04-26 21:42:25 +08:00
DreamPiggy 55e4ce35bd Replace all the demo project to use #import <SDWebImage/SDWebImage.h> module headers instead of massive headers 2018-04-19 17:25:39 +08:00
DreamPiggy 87bbcdc46f Introduce SDAnimatedImage and SDAnimatedImageView for high performance animated image rendering on iOS & macOS 2018-03-25 17:23:12 +08:00
DreamPiggy e012b36679 Refactor the image indicator usage for UIView category. Use two protocol SDWebImageIndicator & SDWebImageProgressIndicator to make this more customizable. Implement two class about activity indicator and progress indicator for both UIKit/AppKit 2018-02-04 14:37:51 +08:00
DreamPiggy dfe68a5db6 Update demo to use modern way of image assets, and view layout for rotation 2017-11-05 15:23:32 +08:00
DreamPiggy efb7c4ebf9 Update our iOS demo to modern way, add a UIProgressView to show image download progress 2017-11-05 07:22:26 +08:00
Bogdan Poplauschi 7b79c29a8c The docs say the progressBlock is called on a background queue, so when doing UI, we need to dispatch on the main queue
* @param progressBlock  A block called while image is downloading
* @note the progress block is executed on a background queue
2017-08-11 16:38:32 +03:00
Bogdan Poplauschi 8382899070 Merge pull request #984 from gztchan:master
Add url as param to progress block
2016-10-01 10:06:35 +03:00
Bogdan Poplauschi 7684fbd9a7 Merge branch '4.x' into gif
# Conflicts:
#	SDWebImage.xcodeproj/project.pbxproj
2016-06-07 08:39:17 +03:00
Bogdan Poplauschi 94c1ec3ed0 Revisited all copyright comments and decided for just one format 2016-06-01 15:53:08 +03:00
Bogdan Poplauschi 44cb993ee9 Successfull attempt to override the UIImageView(WebCache) methods in the FLAnimatedImageView(WebCache) category. This should make the integration easier. Not sure if it will always work 2016-06-01 10:11:46 +03:00
Bogdan Poplauschi 8a488d377b Updated the example project so it supports the animated images as well. 2016-06-01 10:06:37 +03:00
Tony cee50eb648 Add url as param to progress block 2014-12-13 13:01:24 +08:00
Bogdan Poplauschi fe4b3a088a Fixed warnings from demo project (started using the new methods, the ones with the sd_ prefix). 2014-06-20 10:07:12 +03:00
Fabrice Aneche 8b16de2575 fix demo 2014-01-15 10:25:14 -08:00
Andrew Vyazovoy c77652755a Potential strong cycle fixed. 2013-03-27 23:44:47 +07:00
Olivier Poitrey 1ec36c7c99 Do not init an activity indictor if image isn't downloading in demo app (good practice) 2012-11-19 18:30:31 +01:00
Olivier Poitrey 6e99059007 Fix demo app regarding last changes 2012-11-19 16:58:45 +01:00
Olivier Poitrey 0920e7a001 Add activity indicator demo 2012-11-13 18:09:39 +01:00
Olivier Poitrey ea819b2a45 Rework static library settings and documentation and add an example project
Inspired by http://www.blog.montgomerie.net/easy-xcode-static-library-subprojects-and-submodules
2012-05-10 00:30:48 +02:00