lizhuoli
1b0fdd8cb6
Fix the iOS 15+ draw image blank because that CoreGraphics may not transcode on BGRX8888 pixel format context
2022-03-03 20:49:57 +08:00
soondl
8445f2b1a7
Fix imageView blinks with option 'SDImageCacheQueryDiskDataSync'
2022-02-20 16:08:40 +09:00
ty0x2333
8ce13403bc
Fix the bug that `decodedAndScaledDownImageWithImage` does not render the image completely due to the loss of precision.
2022-01-26 07:12:35 +08:00
zhuoyan
cecc984e3f
fix: Eliminates accumulated floating point errors.
2021-12-30 11:31:54 +08:00
Morgan Dock
b02f6f9e45
Don't copy image data
2021-11-25 00:17:08 -06:00
lizhuoli
4274158949
Fix the support for `SDImageLoadersManager` for canRequest API check, should be compatible with both old and new API
2021-10-18 21:30:34 +08:00
kinarobin
7c62b2d9b3
remove useless import
2021-10-12 20:52:18 +08:00
Kinarobin
e10c33bdd0
Merge pull request #3282 from kinarobin/fix-warning-in-uttype
...
Since `UTI` is an standard, we can use it directly to avoid warning on iOS 15
2021-10-12 20:48:36 +08:00
kinarobin
9148de2c07
add tvos check in targetTimestamp
2021-10-09 17:31:11 +08:00
Kinarobin
7425221108
Merge pull request #3281 from SDWebImage/revert-3276-fix-get-image-source-crash
...
Revert "Fix image source release in iOS 15"
2021-10-09 15:16:22 +08:00
kinarobin
25f9d15b57
fix warning in uttype for ios15
2021-10-07 18:15:59 +08:00
Kinarobin
a3f5647517
Revert "Fix image source release in iOS 15"
2021-10-07 10:20:00 +08:00
Michael Thomas
0076d8c447
Add negative duration check for unit tests
...
- The new`targetTimestamp` property causes the duration to be a negative value during the unit tests. Added an additional check to handle this case.
2021-10-05 16:18:00 -04:00
Michael Thomas
19540b3596
Use targetTimestamp in SDDisplayLink
2021-10-05 15:51:36 -04:00
DreamPiggy
e0b8bf97d0
Merge pull request #3277 from dreampiggy/fix_pixel_ratio_thumbnail_calculation
...
Fix pixel ratio thumbnail calculation
2021-09-30 17:41:18 +08:00
lizhuoli
8a13cbb68c
Fix the pixel ratio calculation for thumbnail decoding
2021-09-30 17:39:13 +08:00
lizhuoli
894f061acc
Fix compile issue
2021-09-30 17:37:17 +08:00
DreamPiggy
923e175326
Merge pull request #3258 from GetToSet/sdanimatedimagerep-copy-semantic
...
Make SDAnimatedImageRep confirms to correct copy semantic
2021-09-30 17:29:09 +08:00
DreamPiggy
922c126bbf
Merge pull request #3239 from dreampiggy/behavior_weak_cache_default
...
Do a extra memory cache sync when weak cache feature enabled && Change the default value for `shouldUseWeakMemoryCache` to NO
2021-09-30 17:16:32 +08:00
kinarobin
615e181257
fix image source release in advance
2021-09-29 11:17:12 +08:00
Ethan Wong
2b95a12541
Make SDAnimatedImageRep confirms to correct copy semantic
2021-08-11 23:42:27 +08:00
DreamPiggy
73cd294129
Merge pull request #3241 from dreampiggy/fix_cert_verity_optional
...
Change the default delegate method to allows optional cert in SSL verify, matches URLSession's behavior
2021-05-25 18:01:36 +08:00
DreamPiggy
a77e5f561e
Avoid extra calculation for sd_imageFrameCount
2021-05-25 16:08:53 +08:00
DreamPiggy
7f078d21ba
Adopt SDAnimatedImage for `sd_imageFrameCount`
2021-05-25 16:05:42 +08:00
DreamPiggy
4ae33983e0
Added `sd_imageFrameCount` convenient API for UIAinmatedImage/NSBitmapImageRep
...
Fix one issue when input UIAnimatedImage contains only 1 image
2021-05-25 15:43:46 +08:00
DreamPiggy
18eda252d2
Change the default delegate method to allows optional cert in SSL verify, matches URLSession's behavior
2021-05-23 11:36:39 +08:00
DreamPiggy
b1ee90dca6
Change the default value for `shouldUseWeakMemoryCache` to NO. This feature may effect a little query performance, so it's not suitable to enable by default.
2021-05-21 17:04:06 +08:00
DreamPiggy
e58a872daa
Do a extra memory cache sync when weak cache feature enabled. This can avoid the deallocation from imageView during `sd_setImageWithURL:`
...
This actually fix current weak cache feature's main use case. Before the weak cache may not works as function
2021-05-21 16:59:37 +08:00
DreamPiggy
fd326e3d51
Merge pull request #3238 from dreampiggy/fix_image_from_cache_api_behavior
...
Fix imageFromCacheForKey with options and context behavior, matching the async version one.
2021-05-21 15:43:14 +08:00
DreamPiggy
63a3d0b996
Merge pull request #3237 from kinarobin/fix-wrong-memory-cost
...
Fix wrong memory cost in `_UIAnimatedImage`
2021-05-21 15:37:27 +08:00
kinarobin
426830d55f
change to AWebP
2021-05-21 14:57:14 +08:00
DreamPiggy
04c07f983f
Fix imageFromCacheForKey with options and context behavior, matching the async version one.
...
Support `SDImageCacheDecodeFirstFrameOnly` and `SDImageCacheMatchAnimatedImageClass`
2021-05-21 14:28:16 +08:00
kinarobin
22cd94d08a
fix wrong memory cast in _UIAnimatedImage
2021-05-21 14:06:26 +08:00
DreamPiggy
2e07701e50
Merge pull request #3236 from dreampiggy/fix_warning
...
Fix the warning, enable `APPLICATION_EXTENSION_API_ONLY` for all framework target
2021-05-21 11:50:32 +08:00
DreamPiggy
46912090f9
Fix the warning, enable `APPLICATION_EXTENSION_API_ONLY` for all framework target
2021-05-21 11:50:12 +08:00
DreamPiggy
0b304a867d
Merge pull request #3227 from dreampiggy/feature_acceptable_status_code_content_type
...
Feature: allow user to custom acceptable status code and content type
2021-05-11 16:17:43 +08:00
DreamPiggy
f3d68c9cc2
Added `SDWebImageErrorDownloadResponseKey` userInfo for better error report
2021-05-07 16:40:10 +08:00
DreamPiggy
df7d56373d
Added the feature to config the status code and content type checking logic, do not hard-coded 200-400
2021-05-07 16:26:38 +08:00
Huang-Libo
e1d928a10d
Correct document in SDWebImageDownloader
2021-04-25 23:25:35 +08:00
DreamPiggy
896c5f62f7
Fix the bug that when querying original cache miss, the download process will be skipped. This is not designed behavior.
2021-04-23 12:43:27 +08:00
DreamPiggy
e88df1f819
Merge pull request #3219 from dreampiggy/behavior_transformer_store_query_default_disk
...
Change the .originalStoreCaheType and .originalQueryCacheType into .disk, Now we will store the full image data into disk and re-query the full image data by default
2021-04-23 12:43:02 +08:00
Huang-Libo
f9a8de5684
Fix spelling error in SDWebImageDownloaderOperation
...
tokent -> token
2021-04-23 11:34:34 +08:00
DreamPiggy
a9ef21bd80
Change the .originalStoreCaheType and .originalQueryCacheType into [.disk]. Now we will store the full image data into disk and re-query the full image data by default, which makes it easy for transformer to avoid re-downloading the full size image data.
2021-04-22 17:34:53 +08:00
DreamPiggy
51176c7b74
Added new disk cache config `shouldRemoveExpiredDataWhenTerminate`
2021-04-11 12:53:54 +08:00
DreamPiggy
8f34f98c61
Change the willTerminate auto clean cache logic into sync version
2021-04-11 11:30:51 +08:00
DreamPiggy
d452afdb54
Ensure the invalid URLSeesion will receive the cancel callback and does not trigger the any exception from framework
2021-04-07 11:03:56 +08:00
DreamPiggy
bed1638b42
Revert the "Don't encode/decode image when app will terminate"
2021-04-06 18:21:16 +08:00
DreamPiggy
d1c75d8397
Hotfix for the wrong naming selector during gardening
2021-04-06 11:40:32 +08:00
DreamPiggy
7c7f279b36
Code garden for terminate check
2021-04-01 21:10:26 +08:00
DreamPiggy
aa2e264ffb
Merge pull request #3149 from kinarobin/fix-ImageIO-encode/decode-crash
...
Don't encode/decode image when app will terminated
2021-04-01 20:36:59 +08:00
DreamPiggy
3632adced0
Merge pull request #3184 from dreampiggy/feature_original_image_cache
...
Added the new context option `SDWebImageContextOriginalImageCache`, which control the cache instance used for original full size image query/write when using transformer
2021-03-11 20:43:20 +08:00
DreamPiggy
d621667954
Code garden for the original cache key generation
2021-03-09 15:47:54 +08:00
DreamPiggy
140db1ca46
Fix the logic for choosing the cache instance when using transformer. The original cache should be used when query/store the original image; The transformed cache should be used when query/store transformed image.
...
Added test case `test16ThatTransformerUseDifferentCacheForOriginalAndTransformedImage`
2021-03-09 15:42:09 +08:00
DreamPiggy
ae2ca99465
Added the new context option `SDWebImageContextOriginalImageCache`, which control the cache instance used for original full size image query/write when using transformer
2021-03-09 14:51:55 +08:00
DreamPiggy
30618ce37d
Avoid the strong retain during download decoding, this can make the download opearation fast to destroy and reduce memory peak, especially in progressive decoding
2021-03-05 10:51:00 +08:00
DreamPiggy
319a308995
Change to not mark the `is_incremental` when the progressive decoding `finished` is YES. This can avoid one extra decoding during progressive loading
2021-03-04 20:31:52 +08:00
DreamPiggy
2e7d526a69
Performance enhancement: Allows to use progressive decoding image to callback the completion when finished. Which can reduce the decoding pressure and animation loading delay
2021-03-04 18:46:29 +08:00
jackylee
013223ca8e
Update UIView+WebCache.m
...
fix typo error from `callCompletedBlockClojure` to `callCompletedBlockClosure`
2021-02-13 23:56:56 +08:00
Rachel Brindle
60de72aa5b
Don't unnecessarily copy image data in the Downloader Operation
...
In the DownloaderOperation, we were copying the image data to an NSData, then immediately unassigning the imageData property. Presumably, this was done to prevent the imageData that would be decoded from having additional data added to it while we were decoding it. However, by unassigning the only other reference to it, we already prevented that.
In the SDImageIOCoders, use NSData-initWithData to allow the class cluster to hopefully prevent an unnecessary copy of the data
2021-02-01 18:16:20 -08:00
kinarobin
83183150bb
fix query disk image cache to memory bug
2021-01-15 11:48:58 +08:00
kinarobin
784a29578c
not add protect in frameDuration method
2021-01-04 13:36:10 +08:00
kinarobin
e52686b452
change to IOAnimatedCoder
2021-01-02 21:27:05 +08:00
Kinarobin
500ff37b85
Merge branch 'master' into fix-ImageIO-encode/decode-crash
2021-01-02 17:41:30 +08:00
kinarobin
5a0e31b81b
Do not encode/decode when app terminated
2021-01-02 17:35:13 +08:00
DreamPiggy
9ef128f5a1
Update the code comments about status
2020-12-28 19:31:47 +08:00
DreamPiggy
5ce33b12ba
Fix the rare case that we setFinished=YES before NSOperation started. This may cause exception from Foundation
2020-12-28 17:39:17 +08:00
DreamPiggy
d8961a3e32
Remove the custom NSURLErrorCancelled case when URLSession task been cancelled
2020-12-25 14:32:38 +08:00
DreamPiggy
9a010de0e8
Fix the race condition when user cancel the network loading will not trigger the completion block.
...
Now we do not relay on URLSession delegate timing, directly callback when cancelled.
2020-12-24 13:04:47 +08:00
Brian Stern
cd2bcaadcb
Fix deprecation warnings for OSSpinLock
...
If the deployment target was newer than the target that os_unfair_lock() became available deprecation warnings were generated for use of OSSpinLock. Now OSSpinLock isn't used if the deployment target is >= the OS version where os_unfair_lock() became available.
2020-12-03 10:52:21 -05:00
DreamPiggy
a6857352b4
Merge pull request #3130 from dreampiggy/project_ios9_xcode11
...
Bumped the min deployment target version to iOS 9, macOS 10.11. Bumped the min Xcode version to Xcode 11
2020-11-22 18:10:37 +08:00
DreamPiggy
ac66153ffb
Merge pull request #3118 from huangboju/feature/short_path
...
Shorten code indentation
2020-11-22 11:18:01 +08:00
DreamPiggy
6e34315e6c
Bumped the min deployment target version to iOS 9, macOS 10.11. Bumped the min Xcode version to Xcode 11
...
This follows Apple's App Store submit rule, and user request from the dependency
2020-11-22 11:05:40 +08:00
Insomnia
c69e80286b
Merge branch 'master' into gif_bk
2020-11-20 16:02:18 +08:00
Insomnia
d9409e6cd8
mod: 1. change playback mode getter 2. fix playback mode test typo
2020-11-20 15:44:27 +08:00
DreamPiggy
af96d0b825
Merge pull request #3128 from dreampiggy/feature_replace_semaphore_with_os_unfair_lock_and_spinlock
...
Replace all current dispatch_semaphore usage into the os_unfair_lock, use OSSpinLock for lower firmware
2020-11-20 15:28:43 +08:00
DreamPiggy
d406215cc9
For macCatalyst, which designed to be used on macOS 10.13, so don't need OSSpinLock
2020-11-20 14:48:14 +08:00
DreamPiggy
9365dad9b0
Update the built-in loaders for the new protocol methods
2020-11-19 16:22:44 +08:00
DreamPiggy
6f90bc083a
Added the options and context arg for Image Loader custom protoocl, this can be used for advanced user to grab and check for context for current loading URL to process the logic.
2020-11-19 16:17:56 +08:00
DreamPiggy
cbbf3285e8
Follow Apple's best practice to use lock for array insert/remove thread safe, replace all current dispatch_semaphore usage into the os_unfair_lock, use OSSpinLock for iOS 10- lower firmware
2020-11-19 15:49:45 +08:00
Insomnia
05c6e5d70e
mod: change description of animated player
2020-11-03 09:43:43 +08:00
jourhuang
5c88cf19ed
Update SDImageCache.m
2020-10-31 22:18:31 +08:00
Zhouqi Mo
4e73d478a9
Add animationImages support when using SDAnimatedImageView
2020-10-30 15:36:56 +08:00
Insomnia
8c108d604f
mod: 1. expose animated player 2. modify setup current frame
2020-10-30 11:54:39 +08:00
Insomnia
3926f1bc88
feat: animation playback mode done
2020-10-29 09:58:45 +08:00
Insomnia
aa89511c74
sync
2020-10-28 18:13:00 +08:00
Insomnia
184c8768fa
sync
2020-10-28 11:53:50 +08:00
Insomnia
310de419e7
sync
2020-10-27 22:03:41 +08:00
Insomnia
32d2a79cf8
add: 1. expose animation player 2. add playback mode enum
2020-10-25 19:28:13 +08:00
libin14
ddbeaa1cdc
fix disk image fetch bug
2020-10-21 10:52:52 +08:00
Eric Silverberg
85d1908025
Fix race condition when using transitions that are canceled and then switched to a new transition or load operation
2020-10-14 14:02:06 -04:00
Kinarobin
7c70e574c1
Merge branch 'master' into fix-memory-cache
2020-10-12 19:52:23 +08:00
libin14
d66597a41f
fix store cache in memory bug
2020-10-12 19:46:24 +08:00
seven332
69e492f2ee
Reversely traverse coders in SDAnimatedImage
...
Allow overriding default coders for known image format
2020-10-09 18:30:23 +08:00
YuAo
b52b01d4a2
[SDWebImageTransition] Fix: `duration` is not used in the convenience initializers
2020-09-29 19:31:38 +08:00
DreamPiggy
7cc90666e8
Fix the issue that SDAnimatedImageView will trigger an empty callback when animation stopped. This will cause some bad effect such as rendering a empty image or placeholder image (especially on iOS 14)
2020-09-27 14:58:23 +08:00
DreamPiggy
4f10e79f05
Fix the logic in SDAnimatedImage to detect scale from file path. Should not limit any path length
2020-09-04 16:36:30 +08:00
Wentao Liu
70a57758c0
fix typos in SDImageCache
2020-08-31 19:03:05 +08:00
DreamPiggy
bcda3f5000
Change to always return SDImageCacheTypeDisk cache type when querying memory cache (unless user cancel the query)
2020-08-27 11:08:12 +08:00
DreamPiggy
2c9eaccf23
Remove the `SDWebImageForceTransitionAsync`, change the default behavior because it's most suitable for UI rendering and common use case. No need this hack. If user want, we may produce a `setTransitionBlock` in the future
2020-08-27 10:49:57 +08:00
DreamPiggy
6f61b7e37e
Added the test case about the doing transition when async callback
2020-08-24 16:46:35 +08:00
DreamPiggy
df0f6008fc
Refactory the current behavior to use transition. Introduce `SDWebImageForceTransitionAsync` (compared to old one `SDWebImageForceTransitionAlways`)
2020-08-24 16:24:39 +08:00
DreamPiggy
35578f0524
Merge pull request #3067 from dreampiggy/bugfix_scale_down_too_small_pixels
...
Add the support to pass small bytes to `decodedAndScaledDownLargeImage`, which always scale down (at least 1x1 pixel) but not return the original size
2020-08-24 14:49:04 +08:00
DreamPiggy
c0e34ee391
Update some comments and fix typo
2020-08-15 19:41:48 +08:00
DreamPiggy
6b0ef2e741
Update the new test cases about this new behavior
2020-08-15 19:36:05 +08:00
DreamPiggy
01e5e429fd
Change the behavior, supports to scale down to at least 4 Bytes (1x1 pixels) image. Does not hard-code limit 1MB
2020-08-15 19:24:15 +08:00
DreamPiggy
f9a089d437
Fix the image format detection for smaller SVG which less than 100 Bytes.
2020-08-15 18:50:40 +08:00
DreamPiggy
a746a3a136
Add a protect when tile rectangle is too small to calculate when using `SDWebImageScaleDownLargeImages`
2020-08-15 18:48:01 +08:00
DreamPiggy
b483ec2959
Merge pull request #3070 from dreampiggy/bugfix_exif_thumbnail_pixel_size_large
...
Fix the bug when the thumbnail pixel size is larger than the pixel size, and the image has EXIF orientation, the final UIImage will use wrong image orientation
2020-08-14 14:19:45 +08:00
DreamPiggy
e142610455
Fix the bug when the thumbnail pixel size is larger than the pixel size, and the image has EXIF orientation, the final UIImage will use wrong image orientation
2020-08-13 18:17:28 +08:00
DreamPiggy
74a3d263c9
Update the comments and fix the coding style
2020-08-12 10:38:45 +08:00
DreamPiggy
1873b7198f
Supports the user to customize the default disk cache directory, which can be used to share cache for App && App Extension
2020-08-10 15:41:07 +08:00
DreamPiggy
40023d5668
Merge branch '5.8.x' of https://github.com/SDWebImage/SDWebImage
2020-07-16 21:38:53 +08:00
kinarobin
0e0cc576da
early return when image load canceled
2020-07-16 21:29:23 +08:00
kinarobin
4ed1ce29dc
fix race condition when use transition
2020-07-16 21:29:23 +08:00
kinarobin
8cde50d03d
early return when image load canceled
2020-07-16 20:52:15 +08:00
kinarobin
088b356a1f
fix race condition when use transition
2020-07-16 18:02:47 +08:00
DreamPiggy
aba80b66c2
Try to copy the local NSMutableDictionary before calling CGImageSourceCreateImageAtIndex, try to solve the rare crash inside ImageIO call stack.
2020-07-16 14:26:51 +08:00
DreamPiggy
6fb20ce312
Refactory the implementation of that canDecode/canEncode, use single method with Set to check, instead of creating different internal files
2020-07-06 11:22:53 +08:00
DreamPiggy
53b2420789
Mark the API available for HEIC/AWebP coders, update the example
2020-07-06 10:55:01 +08:00
DreamPiggy
d09ff5a654
Fix the SwiftPM support and Static library
2020-07-03 16:37:01 +08:00
DreamPiggy
8dbc0ac7d8
Add the test cases for WebP decoding. iOS 14 seems does not support Web Encoding currently
2020-07-03 15:53:35 +08:00
DreamPiggy
6eacb15067
Add support for built-in ImageIO WebP codec for iOS 14/tvOS 14/macOS 11/watchOS 7
2020-07-03 12:55:49 +08:00
DreamPiggy
04cc6f682c
Add the support for that UIImage+MultiFormat methods on SDAnimartedImage, which supports encoding the animation like GIF/APNG/WebP with lower compression quality.
2020-07-01 23:21:02 +08:00
DreamPiggy
221aa2c905
Fix the wrong code use super.respondsToSelector, should use the superClass.instancesRespondToSelector to check super class itself contains the implementation
2020-07-01 19:33:19 +08:00
DreamPiggy
033bb5321f
Fix the issue of iOS 14 vector image rendering on SDAnimatedImageView. Should call super method if need for best compatibility
2020-07-01 17:10:32 +08:00
DreamPiggy
15fb09afa1
Merge pull request #3043 from dreampiggy/fix_ios14_animated_image_static_render
...
Fix the issue that SDAnimatedImageView can not render static image on iOS 14.
2020-06-23 21:20:56 +08:00
DreamPiggy
bb7b1914e6
Fix the issue that SDAnimatedImageView can not render static image on iOS 14.
...
UIKit some internal behavior changes and we should always update the render layer if we have no `currentFrame`
2020-06-23 16:01:42 +08:00
Henry Huang
4332c29740
Fix the `maxPixelSize` logic issue will cause a upscale in SDImageIOAnimatedCoder
2020-06-22 16:15:22 +08:00
DreamPiggy
6a227343a6
Change to use kCGImageSourceCreateThumbnailFromImageAlways to solve the issue when HEIC/JPEG contains an embed thumbnail but its size is much smaller than provided `maxPixelSize`
2020-06-12 11:41:22 +08:00
DreamPiggy
f8fa41218d
Merge pull request #3037 from dreampiggy/bugfix_request_modifier_nil
...
Fix the issue that the NSURLRequest method should not be nil, which may cause Crash
2020-06-12 11:29:32 +08:00
DreamPiggy
2d33fc8e6e
Fix the issue that the NSURLRequest method should not be nil.
2020-06-12 11:21:55 +08:00
Philip Dukhov
7435113072
seek returning nil image fix
2020-06-02 13:58:53 +07:00
DreamPiggy
c9ef6ce541
Added the convenient transition with duration APIs
2020-06-02 10:50:34 +08:00
Christopher Truman
4c6f9201ba
One more
2020-05-31 18:18:26 -07:00
Christopher Truman
05bd44e56e
Fixing Typos throughout project
2020-05-31 17:30:01 -07:00
DreamPiggy
34ec3b7bf1
Fix the issue that ImageIO max pixel size larger than image size will cause a upscale. This is not the documented behavior
2020-05-15 11:02:05 +08:00
DreamPiggy
f2f1daf7bb
Update the comments about autoPlayAnimatedImage
2020-05-11 11:31:29 +08:00
DreamPiggy
a31ba1782f
Merge pull request #3003 from liulichao123/autoplay
...
Added autoplay control property to AnimatedImageView (autoPlayAnimatedImage)
2020-05-10 15:19:56 +08:00
liulichao
3e87488a4c
Modify SDAnimatedImageView
2020-05-09 21:56:34 +08:00
liulichao
bfc827c804
FIX Fixed AutoPlayAnimatedImage test case
2020-05-09 12:21:10 +08:00
刘立超
992f231f15
Add a test case for autoPlayAnimatedImage
2020-05-08 23:43:41 +08:00
DreamPiggy
87f2418b0e
Polish the error description between image decode failed and image size is 0
2020-05-08 18:34:32 +08:00
DreamPiggy
16e2f6f6a1
Merge pull request #2997 from dreampiggy/black_list_error_code
...
Mark the black list formal error code, support remove the failed URL from black list
2020-05-08 17:09:47 +08:00
liulichao
26a765a71d
Optimize auto playback control
2020-05-07 21:23:52 +08:00
liulichao
03aaaac928
Added autoplay control property to AnimatedImageView (autoPlayAnimatedImage)
2020-05-07 20:23:09 +08:00
DreamPiggy
7a430b23b9
Merge branch '5.7.x' of https://github.com/SDWebImage/SDWebImage
...
# Conflicts:
# SDWebImage.xcodeproj/project.pbxproj
2020-05-06 21:51:03 +08:00
DreamPiggy
fe730cc7e4
Fix the deadlock by using the two different semaphore, the `@synchronized` can not represent two pointer array lock and may be entered twice
2020-05-06 16:13:32 +08:00
DreamPiggy
54771ceb22
Fix the wrong subclass which does not override `isConcurrent` method
2020-05-06 10:32:35 +08:00
DreamPiggy
f51992cfd6
Mark the `SDAsyncBlockOperation` safe using the lock and correct override method
2020-04-30 19:19:55 +08:00
DreamPiggy
4173f9f3c1
Fix the issue that NSOperation conforms to `SDWebImageOperation` check failed. And fix the SDAsyncBlockOperation cancel logic
2020-04-30 18:50:18 +08:00
DreamPiggy
0ba0aaca34
Added the API to remove failed URLs from black list, since now we populate the error code and user can know which URL get blocked
2020-04-29 21:49:48 +08:00
DreamPiggy
0dd1d42397
Mark the black list error formal error code (which previouslly use `SDWebImageErrorInvalidURL`)
2020-04-29 21:47:16 +08:00
DreamPiggy
d43e0d26f7
Update the comments and coding style about the original cache type feature
2020-04-29 21:34:23 +08:00
DreamPiggy
3b088e7260
Merge pull request #2992 from ZXIOU/addQuaryOriginalChcheForTransformedImage
...
Add quary original chche for transformed image
2020-04-29 20:19:10 +08:00
DreamPiggy
8323aa7564
Merge pull request #2985 from dreampiggy/feature_convient_mac_transition
...
Added the convenient transition options for macOS user. Deprecate the old timingFunction, which can use System API to achieve
2020-04-29 20:10:00 +08:00
zxiou
ee18f7f55d
Make some simple logical adjustments
2020-04-29 16:21:32 +08:00
DreamPiggy
e85beab792
Merge pull request #2990 from dreampiggy/feature_convenient_header
...
Add the convenient request/response modifier, which provide HTTP header directly
2020-04-27 15:48:40 +08:00
DreamPiggy
cc3f03dfa4
Add the test case about conveniences modifier, rename the category name
2020-04-27 12:10:56 +08:00
zxiou
a84ade991c
fix quary original cache for transformed image instead of downloadingq
2020-04-26 17:41:45 +08:00
DreamPiggy
c4aaa8c63c
Merge pull request #2986 from dreampiggy/feature_pass_set_operation_key
...
Feature pass the set operation key into context option from upstream. Fix the potential retain cycle if user use custom manager
2020-04-26 13:45:04 +08:00
DreamPiggy
783353bfe9
Update the convienient API using the Category, actually most use case is HTTP request, data and file URL are rare
2020-04-24 18:54:16 +08:00
DreamPiggy
fb517edf37
Use the String instead of CFNetwork symbol, seems not visible on watchOS ;)
2020-04-24 18:13:26 +08:00
DreamPiggy
484f6f422c
Add the only headers arg convenience initializer
2020-04-24 12:19:51 +08:00
DreamPiggy
6379dfc58b
Add the convenient request/response modifier, which provide HTTP header directly, don't need to repeat the code
2020-04-24 12:04:54 +08:00
DreamPiggy
f84678a44d
Add the support for embed thumbnail for JPEG/HEIF/AVIF
2020-04-21 13:50:58 +08:00
DreamPiggy
8d1d0b0802
Merge pull request #2989 from dreampiggy/bugfix_encoding_options_imageio
...
Fix the encoding options which does not passthrough the correct value to ImageIO
2020-04-21 13:48:48 +08:00
DreamPiggy
816329f403
Fix the previous code which does not passthrough the correct value to ImageIO
2020-04-21 13:44:35 +08:00
DreamPiggy
34b59d1f79
Fix the support for SDWebImageMapKit
2020-04-19 12:53:12 +08:00
DreamPiggy
1708ec67c1
Support the SwiftPM Objective-C user to use #improt <SDWebImage/SDWebImage.h>, by using the link to the public header files and construct the same folder layout
2020-04-19 12:30:39 +08:00
DreamPiggy
64b13dc346
Allows to keep the set image operation key to downstream component like downloader or cacher, used for tracing
2020-04-17 15:51:19 +08:00
DreamPiggy
1cb0d2e2ba
Added the convenient transition options for macOS user. Deprecate the old timingFunction, which can use System API to achieve
2020-04-17 15:36:08 +08:00
DreamPiggy
774571f498
Merge pull request #2977 from dreampiggy/attempt_fix_image_io_animated_image_thread_safe
...
SDAnimatedImageView animation rendering should not use CGContext force decoding, use `kCGImageSourceShouldCacheImmediately` instead which can avoid OOM for large number of GIFs
2020-04-11 17:40:59 +08:00
DreamPiggy
c68f7f8196
Merge pull request #2983 from dreampiggy/project_rename_private_header_avoid_bad_pod_conflict
...
Rename the private header `UIColor+HexString` and `NSBezierPath+SDRoundedCorners` with SD prefix, to avoid the conflict when using CocoaPods
2020-04-11 17:40:26 +08:00
DreamPiggy
d112d18088
Rename the private header `UIColor+HexString` and `NSBezierPath+SDRoundedCorners` with SD prefix, to avoid the conflict when using CocoaPods
2020-04-11 17:01:47 +08:00
DreamPiggy
a5e129dac7
SDAnimatedImageView animation rendering should not use CGContext force decoding, use `kCGImageSourceShouldCacheImmediately` instead which can avoid OOM for large number of GIFs #2977
2020-04-11 16:00:22 +08:00
DreamPiggy
13bae85e3d
Fix that when first play animated image and use maxBufferSize to 0, the calculation does not works (The CGImage is nil)
2020-04-10 23:34:23 +08:00
Brian Amerige
ed8887db35
[SDWebImageManager] Don't copy attributes from originalImage to transformedImage. This fixes https://github.com/SDWebImage/SDWebImage/issues/2975 .
2020-04-07 13:58:11 -07:00
DreamPiggy
bbc65ed0cc
Fix the wrong value assignment for SDAnimatedImageView code on macOS, warning
2020-04-04 18:30:30 +08:00
DreamPiggy
83a40c3679
Merge pull request #2973 from dreampiggy/behavior_uttype_from_unkown_format
...
Change the behavior to return the abstract type for unknown image format, this can solve the accident issue for custom coder who provide a new format
2020-04-04 16:52:53 +08:00
DreamPiggy
6316f08bb8
Remove the compression quality when have max file size limit, and update the test cases for JPEG
2020-04-04 15:53:46 +08:00
DreamPiggy
b427ad5f3f
Added the support for max file size for lossy encoding
2020-04-04 15:31:34 +08:00
DreamPiggy
1ce44a12b0
Change the behavior to return the abstract for unknown UTI type, this can solve the accident issue for custom coder who provide a new format
2020-04-04 14:19:08 +08:00
DreamPiggy
f798b89fc2
Fix the maxPixelSize for animated images, update the readme
2020-04-04 00:01:26 +08:00
DreamPiggy
e71bbf239c
Supports the encoding max pixel size options as well, which let the codec to do thumbnail rescale encoding, better performance than transformer to scale and then encode
2020-04-03 23:28:08 +08:00
DreamPiggy
2ca731c2e8
Support to provide the background color when you encode a alpha UIImage into non-alpha format like JPEG
2020-04-03 22:52:43 +08:00
DreamPiggy
8c2141ecda
Added the API to query disk image with options and context, this is needed if you have animated image/transformer/thumbnail usage
2020-04-03 11:25:47 +08:00
DreamPiggy
dfc8fe27d9
Refactory to simplify the code to calculate the original cache key, pass null to disable this.
2020-04-02 20:15:22 +08:00
DreamPiggy
543b5c95d4
Fix the test case about the original cache key calculation rule
2020-04-02 20:15:22 +08:00
DreamPiggy
1dc70b8430
Refactory the current thumbnail && transformer about cache key. Developer should have the API to calcualte the cache key from thumbnail or transformer, not hard-coded.
2020-04-02 20:15:22 +08:00
DreamPiggy
51dee05acf
Merge pull request #2968 from dreampiggy/feature_query_cache_type
...
Added new query cache type support, including the SDImageCache API and context option
2020-04-02 16:55:56 +08:00
DreamPiggy
ce4eced4d4
Added the query cache type cases as well, update some documentation
2020-04-02 16:15:10 +08:00
DreamPiggy
ae1f6b9b8c
Revert the removal to the old SDImageCache protocol API, should keep API with to use .all cache type, until next major version
2020-04-02 11:41:17 +08:00
huangboju
45be39f4a1
Update SDFileAttributeHelper.m
2020-04-02 10:15:12 +08:00
DreamPiggy
de153b0a32
Added the new Async API for disk data query, to avoid user to dispatch their own global queu (not IO queue), solve the IO safe issue
2020-04-01 17:16:33 +08:00
DreamPiggy
fbe76bc436
Added new query cache type support, including the SDImageCache API and context option
2020-04-01 17:16:33 +08:00
huangboju
a7606eb5e2
simplify code
2020-04-01 14:38:22 +08:00
DreamPiggy
ab2be2373f
Merge pull request #2483 from dreampiggy/fix_progressive_coder_queue
...
Keep the progressive decoding process only exist one per image download. Cancel the unused progressive decoding when full pixel data is available.
2020-03-13 11:43:39 +08:00
DreamPiggy
0f2818a6c1
Merge pull request #2959 from dreampiggy/little_private_header_garden
...
Fix the NotificationCenter does not remove the observer and little private header garden
2020-03-11 14:51:09 +08:00
DreamPiggy
8f9174a952
Coding Style fix
2020-03-11 12:19:10 +08:00
DreamPiggy
13d0e739fb
Update the coderQueue QoS based on SDWebImageDownloaderLowPriority && SDWebImageDownloaderHighPriority
2020-03-11 11:54:10 +08:00
DreamPiggy
3d1280315b
Keep the progressive decoding process only exist one per image download. Cancel the unused progressive decoding when full pixel data is available.
2020-03-11 11:46:03 +08:00
DreamPiggy
bd33f4179d
Supresss the deprecation warning when min deployment target version set to iOS 13+ or macCatalyst
2020-03-05 18:44:50 +08:00
DreamPiggy
b54cdcc4bb
Change the deprecatation into the soft deprecation, which still works but will be removed in SDWebImage 6.0.0
2020-03-05 17:55:39 +08:00
DreamPiggy
cf79d1c3ae
Revert the changes to check `SDWebImageRetryFailed` before adding the black list. This is the previous version behavior.
2020-03-05 17:00:04 +08:00
DreamPiggy
2abb8d0628
Formal deprecate the SDWebImageContextCustomManager context option
2020-03-04 12:25:59 +08:00
DreamPiggy
f0388739b6
Add the new context option, including the cache, loader and coder. They can be used to use custom cache/loader in a more convenient way, instead of creating dummy SDWebImageManager
2020-03-04 12:18:29 +08:00
DreamPiggy
6f8d83b2f2
Add another logic. to check UIAnimatedImage when there are no image format to detect, this should use GIF to encode
2020-03-02 14:52:50 +08:00
DreamPiggy
3df399508e
Add a better check to handle the cases when call `storeImage` without imageData. Firstly check SDAnimatedImage, then check sd_imageFormat.
2020-03-02 14:52:50 +08:00
DreamPiggy
692f01b84b
Fix the rare case when call `SDWebImageDownloaderOperation.cancel`, the completion block will callback twice
2020-03-02 13:06:09 +08:00
DreamPiggy
f607e909bc
Fix the SDWebImageDownloadStopNotification does not get removed on dealloc
2020-02-27 16:31:54 +08:00
DreamPiggy
b395243d37
Garden all the private headers with description and null-ability annotation
2020-02-27 15:55:53 +08:00
DreamPiggy
faf82c1e1a
Complete all the SDWebImage error code with the localized description, make it easy for debugging
2020-02-27 15:39:37 +08:00
DreamPiggy
f7d0fae94d
Merge pull request #2947 from dreampiggy/project_try_fix_swiftpm_swift5.2
...
Try to fix the issue caused by Swift PM 5.2, the `sources` DSL only matches the individual source files, but not folder
2020-02-27 14:56:45 +08:00
DreamPiggy
c0f796aa77
Try to fix the issue caused by Swift PM 5.2, the `sources` DSL only matches the individual source files, but not folder
2020-02-27 11:59:56 +08:00
DreamPiggy
5c3c40288f
Merge pull request #2936 from dreampiggy/feature_better_vector_support_pdf
...
Feature - better support for vector format detection, now PDF rasterized bitmap is built-in
2020-02-26 16:02:20 +08:00
DreamPiggy
ac4dcbe316
Copy the SVG detection from SVGCoder to the utils
2020-02-26 12:14:50 +08:00
DreamPiggy
4acd81177b
Added macros to expand SPI symbol to Selector, which can make it easy to distinguish and maintain in the future
2020-02-12 12:35:48 +08:00
DreamPiggy
4d354c4acd
Make the SDAniamtedImage response to the UIImage+Metadata category method, which should return the status matching the behavior
2020-02-12 12:13:04 +08:00
DreamPiggy
d56636e15b
Update the Example and Test case about URLSessionMetrics, expose the API in UIVIew+WebCache to make it easy to write code (or user have to write NSStringFromClass)
2020-01-30 18:33:16 +08:00
DreamPiggy
ed894ecff5
Added the metrics in the download token, make it easy to grab the information right in completion block (is this useful ?)
2020-01-30 17:32:46 +08:00
DreamPiggy
bb424d44fd
Added the URLSessionTaskMetrics support for downloader && operation, which can be used for network metrics
2020-01-30 16:52:55 +08:00
DreamPiggy
5629af8330
Added `SDWebImageTransformVectorImage`, which can allows the transformer to transform the vector image format, although most coders works for vector format (if you don't grab CGImage), some are not
2020-01-30 16:13:05 +08:00
DreamPiggy
ef2373668e
Fix the Xcode 10 support using runtime selector, the force decode feature does not process on vector image format
2020-01-30 15:59:15 +08:00
DreamPiggy
8c6556e835
Fix the PDF data detection
2020-01-30 15:29:15 +08:00
DreamPiggy
96b0a2e031
Added the default ImageIO coder with PDF support, use the screen size if user does not provide any explict pixel size
2020-01-30 15:11:42 +08:00
DreamPiggy
08aab785db
Added the case to detect PDF format from file signature
2020-01-30 14:04:12 +08:00
DreamPiggy
8ca4556066
Added the `sd_isVector` API on UIImage+Metadata, useful for case when we want to filter the vector/bitmap images. Vector currently only sipports PDF/SVG
2020-01-30 13:50:53 +08:00
DreamPiggy
cb84dbb273
Added the PDF/SVG image type define
2020-01-30 13:31:57 +08:00
DreamPiggy
3459cd2fd0
Merge pull request #2934 from dreampiggy/bugfix_max_buffer_size
...
Fix the issue that `maxBufferSize` property does not correctlly works for `SDAnimatedImageView`
2020-01-26 18:36:06 +08:00
DreamPiggy
d565a37529
Fix the issue that `maxBufferSize` property does not correctlly works for `SDAnimatedImageView`, should setup the player's property
2020-01-26 18:05:39 +08:00
Ben Govero
25fe6e97f9
Update docs to show correct arguments for SDInternalCompletionBlock
2020-01-23 17:53:14 -06:00
DreamPiggy
bce101d112
The progressive animation should not update the loop count to 1 when automatically stopped at last index.
2020-01-18 15:38:02 +08:00
DreamPiggy
649665e1b0
Fix the SDAnimatedImageView's progressive animation bug, which reset the frame index to 0 each time new frames available
2020-01-18 14:58:52 +08:00
DreamPiggy
b8b7438ce9
Fix the wrong behavior of current sd_blurredImageWithRadius, which calculate the wrong box size for consolve
2020-01-15 21:35:15 +08:00
DreamPiggy
e376dad5f6
Update some wrong code comments
2020-01-15 12:34:57 +08:00
DreamPiggy
7e3482d4fc
Fix the issue of `CGImageCreateScaled`, which should use BGRX8888 on non-alpha image, BGRA8888 on alpha image
2020-01-15 11:56:19 +08:00
DreamPiggy
150ad1b104
Apply a `Thumbnail-` prefix for the cache key for all the thumbnail images, this can avoid cache issue when you query the same URL with different thumbnail size
2020-01-10 23:35:43 +08:00
DreamPiggy
f376b5da9a
Fix the behavior of limit width and height for thumbnail pixel size, should not be greater than the size
2020-01-10 23:34:55 +08:00
DreamPiggy
2e629f6c46
Fix the issue that preserveAspectRatio default value, now it's YES
2020-01-10 19:46:37 +08:00
DreamPiggy
77283f6116
Update the test case, fix the behavior of thumbnail pixel size when aspect ratio is YES.
2020-01-10 18:23:41 +08:00
DreamPiggy
03e63ede25
Change the default limit bytes 60MB on iOS/tvOS, 90MB on macOS, 30MB on watchOS
2020-01-10 11:54:11 +08:00
DreamPiggy
9e5ef8c0e9
Change all the force decode method to be compatible with macOS. Update the documentation as well
2020-01-10 11:54:11 +08:00
DreamPiggy
ec620438b9
Fix the edge case when incrementalDecodedImageWithOptions provide custom scale factor and override the one from init method
2020-01-10 11:54:11 +08:00
DreamPiggy
c9dffc64dc
Fix the compile issue on macOS. Fix the animated frame force decode issue on macOS
2020-01-10 11:54:11 +08:00
DreamPiggy
6bb8641783
Bridge the exist options `SDWebImageScaleDownLargeImages`, to use the thumbnail decoding instead. Defaults use 60MB limit and thumbnail size is (3966, 3966)
2020-01-10 11:54:11 +08:00
DreamPiggy
19af6b76e6
Add the preserveAspectRatio and thumbnailPixelSize in the context options, update the usage
2020-01-10 11:54:11 +08:00
DreamPiggy
ae4aa3f848
Fix the animated image for sd_imageFormat
2020-01-10 11:54:11 +08:00
DreamPiggy
0b0c0d2840
Add the support for animated coder for thumbnail images
2020-01-10 11:54:11 +08:00
DreamPiggy
80c6454495
Add the support for incremental decoding for thumbnail images
2020-01-10 11:54:11 +08:00
DreamPiggy
a244962926
Add the thumbnail decoding API for protocols, update the code for ImageIO coders
2020-01-10 11:54:11 +08:00