DreamPiggy
a97d502304
Merge pull request #3439 from dreampiggy/bugfix/thread_safe_callback
...
Fix the missing lock for callbackTokens which may cause thread-safe issue
2022-11-11 15:30:36 +08:00
DreamPiggy
736f3f41f7
Move block before sending to the main queue
...
This can avoid some life cycle issue and increase performance
2022-11-11 14:29:20 +08:00
DreamPiggy
384b2d7c8b
Fix the missing lock for callbackTokens which may cause thread-safe issue
2022-11-11 14:22:49 +08:00
DreamPiggy
bc3f09ccbd
Merge pull request #3436 from dreampiggy/bugfix/ios16_pdf_use_coregraphics
...
Use CoreGraphics to decode PDF instead of ImageIO to solve iOS 16's issue
2022-11-11 14:17:17 +08:00
DreamPiggy
30f165abd5
Change from instance method to class method
2022-11-11 00:07:32 +08:00
DreamPiggy
f4706453d6
Use CoreGraphics to decode PDF instead of ImageIO to solve iOS 16's issue
...
We no longer use ImageIO to decode PDF, seems they don't maintain that kSDCGImageSourceRasterizationDPI
Copy the code from SDWebImagePDFCoder, need to update
2022-11-10 23:54:14 +08:00
DreamPiggy
8a26bb3f3d
Merge pull request #3434 from dreampiggy/bugfix/underlying_queue_crash_ios12
...
Fix the iOS 12 crash because the underlyingQueue is nil
2022-11-10 22:41:26 +08:00
DreamPiggy
d96ea392d1
Fix the iOS 12 crash because the underlyingQueue is nil
...
Use NSOperation dependency to solve this issue
2022-11-10 22:03:12 +08:00
DreamPiggy
b6aa428b7d
Bumped version to 5.14.0
...
update CHANGELOG
2022-11-08 22:48:52 +08:00
DreamPiggy
35b28d4179
Merge pull request #3430 from dreampiggy/feat/add_is_thumbnail
...
Added the helper convenient API `sd_isThumbnail`
2022-11-08 22:42:00 +08:00
DreamPiggy
bfa91a291b
Added the helper convenient API `sd_isThumbnail`
...
Fix the metadata does not saved
2022-11-08 22:40:36 +08:00
DreamPiggy
03b46475eb
Revert #2792 , the autoreleasepool does not solve the issue
2022-11-08 21:49:26 +08:00
DreamPiggy
6ce59aa8c1
Merge pull request #3429 from dreampiggy/perf/remove_conforms_to_protocol
...
Replace conformsToProtocol call with appropriate respondsToSelector check to improve performance
2022-11-08 21:44:07 +08:00
DreamPiggy
7ddf3214e6
Fix the test case again on below iOS 15
2022-11-08 21:18:20 +08:00
DreamPiggy
f8d353b50c
Update test case `test06ThatUsingACustomDownloaderOperationWorks`
2022-11-08 20:04:36 +08:00
DreamPiggy
9aa27b61e8
Replace conformsToProtocol call with appropriate respondsToSelector check
...
This effect API called with multiple times, for some one-time setup and important check, the conformsToProtocol is remained
2022-11-08 20:04:15 +08:00
DreamPiggy
359036eae9
Merge pull request #3428 from dreampiggy/opt/avoid_store_again_when_origin_disk_exits
...
Avoid store again when origin disk cache hit during Thumbnail or Transformer with smaller pixel size
2022-11-08 19:16:05 +08:00
DreamPiggy
6a9b578369
Added test case `test21ThatQueryOriginalDiskCacheFromThumbnailShouldNotWriteBackDiskCache`
2022-11-08 18:51:47 +08:00
riv1r
9599a78ff9
Fix del redundant autoreleasepool ( #3388 )
...
* fix:del redundant autoreleasepool, because frameProperties is not a __autoreleasing reference object, for-Loop does not cause untimely release
* fix:del redundant autoreleasepool, because frame is strongly referenced by frames, for-Loop does not cause untimely release
* fix:del redundant autoreleasepool, because sourceTileImageRef is released by CGImageRelease, for-Loop does not cause untimely release
Co-authored-by: chendongran06039 <chendongran06039@hellobike.com>
Co-authored-by: DreamPiggy <lizhuoli1126@126.com>
2022-11-08 17:29:49 +08:00
DreamPiggy
f93cf96832
Avoid store original disk cache again when using thumbnail or transformer from the full size data
...
This solve #3395
2022-11-08 16:44:40 +08:00
DreamPiggy
5a89f80816
Merge pull request #3427 from dreampiggy/bugfix/logic_nullable_check
...
Add the possible nullable logic check when the force-decode/copy failed
2022-11-08 16:41:40 +08:00
DreamPiggy
cdd77d5ebe
Merge pull request #3426 from dreampiggy/bugfix/UTI_hint_ignore_dynamic_log
...
Ignore the dynamic UTI type hint to avoid extra log
2022-11-08 16:20:33 +08:00
DreamPiggy
0d1c603d50
Add the possible nullable logic check when the force-decode/copy failed
2022-11-08 16:19:49 +08:00
DreamPiggy
c81aec4ccd
Ignore the dynamic UTI type hint to avoid extra log
2022-11-08 16:15:25 +08:00
DreamPiggy
f6769186b9
Merge pull request #3425 from dreampiggy/feature/imageio_force_decode_option_control
...
Added `SDImageCoderDecodeUseLazyDecoding` to control whether to use lazy-decoding for ImageIO. Introduce new workaround to strip CGImage retained CGImageSource on iOS 15
2022-11-08 14:36:55 +08:00
DreamPiggy
6c83696800
Update test case `test17ThatMinimumProgressIntervalWorks` to make it more stable
2022-11-07 18:39:33 +08:00
DreamPiggy
7c4649c7cc
Update the test case `test23ThatThumbnailEncodeCalculation`
2022-11-07 15:25:52 +08:00
DreamPiggy
136d05fce8
Add extra check when user provide SDImageCoderDecodeUseLazyDecoding
2022-11-07 12:44:46 +08:00
DreamPiggy
3000dd5098
Fix the `sd_isDecoded` did not set after we use SDCGImageCreateCopy
2022-11-07 12:20:04 +08:00
DreamPiggy
db25af9506
Recovery the assert check on only iPhone/TV simulator in debug mode
2022-11-07 12:10:22 +08:00
DreamPiggy
abc06f020a
Added `SDImageCoderDecodeUseLazyDecoding` to control whether to use lazy-decoding for ImageIO or not
...
Defaults to NO for animated image coder but YES for static image coder to match current behavior
This also use another way to solve iOS 15+'s CGImageGetImageSource issue
2022-11-07 12:10:22 +08:00
DreamPiggy
ddcf347c7d
Update README about GitHub action status
2022-11-01 14:20:44 +08:00
DreamPiggy
5ee6ac2476
Merge pull request #3423 from dreampiggy/feature/refactor_thumbnail_hack_with_decode_options
...
Refactor the hack for multiple thumbnail image request at the same time
2022-11-01 00:14:17 +08:00
DreamPiggy
279f636ac5
Minor check the logic that UTI has high priority than path extension
2022-10-31 23:52:32 +08:00
DreamPiggy
e3c6cfa066
Update test case to make clear that transformed image and thumbnailed image will callback without data
2022-10-31 23:52:32 +08:00
DreamPiggy
980e0dd14a
Added test case test30ThatDifferentThumbnailLoadShouldCallbackDifferentSize
2022-10-31 23:52:32 +08:00
DreamPiggy
2fd75638fe
Refactor the hack for multiple thumbnail image request at the same time
...
1. Put the hack logic into SDWebImageDownloadOperation, each different thumbnail image request will have its callback with desired size of image using different decoding call.
2. Progressive Thumbnail decoding (use together) does not have this behavior, because I think progressive thumbnail is really rare and tolerant, people just use the first thumbnail size image for preview and OK.
3. The manager logic refactor with separate steps, focus on clear to understand the complicated logic and maintainess
4. The thumbnail decode/transformed will callback valid image, but with nil data, this matches the behavior as wiki pages.
2022-10-31 23:52:32 +08:00
DreamPiggy
4a72e4fee2
Merge pull request #3421 from dreampiggy/feature/decode_options_in_from_loader_instead
...
Introduce SDWebImageContextImageDecodeOptions, deprecate SDImageCoderWebImageContext
2022-10-30 18:34:30 +08:00
DreamPiggy
851b60e0f3
Added test case `test20ThatContextPassDecodeOptionsWorks`
2022-10-30 17:55:16 +08:00
DreamPiggy
2f3652dc2e
Feature: Introduce SDWebImageContextImageDecodeOptions, deprecate SDImageCoderWebImageContext
...
This can solve the retain cycle from the scratch, instead of hacking
2022-10-29 20:51:11 +08:00
DreamPiggy
b014808ddd
Merge branch '5.13.x' of github.com:SDWebImage/SDWebImage
...
# Conflicts:
# SDWebImage/Core/SDImageCacheDefine.m
2022-10-29 20:40:00 +08:00
DreamPiggy
318cca556b
Fix the issue that progressive decode logic does not get updated
2022-10-29 20:34:04 +08:00
DreamPiggy
55a3809412
Bumped version to 5.13.5
...
update CHANGELOG
2022-10-29 20:26:05 +08:00
DreamPiggy
34f2a9b823
Merge pull request #3420 from dreampiggy/fix_5.13_retain_cycle_web_context
...
Quick fix the issue that UIImage.sd_decodeOptions cause retain cycle when pass custom cache in context option
2022-10-29 20:22:21 +08:00
DreamPiggy
b46fe38c72
Quick fix the issue that UIImage.sd_decodeOptions cause retain cycle when pass custom cache in context option
...
Now the SDImageCoderWebImageContext does not pass the built-in options, only custom options will be passed, and deprecated in 5.14.0
2022-10-29 19:50:45 +08:00
DreamPiggy
3a52ef5aeb
Merge pull request #3419 from dreampiggy/feature/tiff_uti_hint
...
Support use url.path or custom UTI hint passed to ImageIO, solve the TIFF/NEF/SRW raw image decoding with wrong size
2022-10-29 18:34:56 +08:00
DreamPiggy
8dd6e25cd8
Added NEF test case, as well as BMP type enum
...
The file extension hint works on iOS/macOS for current
2022-10-29 18:13:36 +08:00
DreamPiggy
b1b16a17b3
Support use url.path or custom UTI hint passed to ImageIO, solve the TIFF/NEF/SRW raw image decoding with wrong size
...
This is because file extension will cause ImageIO use different codec, which does not support all of them without context
2022-10-27 11:11:28 +08:00
DreamPiggy
9248fe561a
Bumped version to 5.13.4
...
update CHANGELOG
2022-09-26 20:57:44 +08:00
DreamPiggy
3c7c949637
Merge pull request #3408 from dreampiggy/threadsafe_fix_imageio_incremental_animation
...
Fix the potential out of bounds crash for ImageIO incremental animation decoding (like GIF)
2022-09-26 20:55:27 +08:00