DreamPiggy
7d7debbd26
Merge pull request #3380 from dreampiggy/bugfix_edge_case_cancel_cache_callback_twice
...
Fix the rare case when cancel an async disk cache query may cause twice callback
2022-07-23 23:04:55 +08:00
DreamPiggy
bcaf918b83
Fix the old test case warning
2022-07-23 22:43:01 +08:00
DreamPiggy
62e3a8f52a
Update test case about the cacheOperation and loaderOperation
2022-07-23 22:31:52 +08:00
DreamPiggy
3d1197b820
When download start, mark the query cache operation finished to avoid bug behavior
2022-07-23 21:59:14 +08:00
DreamPiggy
2729096221
Added test case `test15CancelQueryShouldCallbackOnceInSync`
2022-07-23 21:26:18 +08:00
DreamPiggy
0643cb81c3
Fix the rare case when cancel an async disk cache query may cause twice callback
...
One is sync and another is async
2022-07-23 21:15:00 +08:00
DreamPiggy
b88d576f75
Merge pull request #3379 from amonshiz/patch-1
...
Fix pragma mark typo
2022-07-23 16:39:13 +08:00
Andrew Monshizadeh
2bad528bfb
Fix pragma mark typo
...
Built and noticed this warning
```
external/SDWebImage/SDWebImage/Core/NSButton+WebCache.m:152:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma mar - Private
^
```
2022-07-22 21:49:09 -06:00
DreamPiggy
cc1995b738
Bumped version to 5.13.1
...
update CHANGELOG
2022-07-16 19:54:13 +08:00
DreamPiggy
7269107908
Merge pull request #3373 from dreampiggy/fix_clang_analyze_issue
...
Fix the clang analyze issue
2022-07-16 19:46:17 +08:00
DreamPiggy
0757241822
Fix the clang analyze issue
2022-07-16 19:43:48 +08:00
DreamPiggy
d0f3c39335
Merge pull request #3368 from dreampiggy/optimize_force_decode_solution
...
Added `SDImageCoder.defaultDecodeSolution` to control the force decode solution. Automatic by default
2022-07-16 19:33:46 +08:00
DreamPiggy
a88e669422
Added SDImageCoderDecodeSolutionAutomatic, which check image format as well
...
This avoid the unwanted CMPhoto log
2022-07-16 18:03:11 +08:00
DreamPiggy
213a8b8def
Added `SDImageCoder.defaultDecodeSolution` to control the force decode solution, defaults to CoreGraphics (the same as 5.12)
...
For user who want new UIKit solution, you can opt-in to change the `defaultDecodeSolution` case
2022-07-16 18:03:11 +08:00
DreamPiggy
ff6b3b9bb5
Change only ImageIO decoded CGImage should enter the `Force Decode` logic
...
Others coder, like WebP, should not use this approach
2022-07-16 18:03:11 +08:00
DreamPiggy
3277824d43
Merge pull request #3372 from dreampiggy/bugfix_color_at_point_grayscale
...
Fix sd_colorAtPoint and sd_colorsWithRect support for grayscale image (white and alpha)
2022-07-16 18:01:54 +08:00
DreamPiggy
1ed76f4f47
Fix the bitmapInfo support for greyscale color, update test case
2022-07-16 17:43:48 +08:00
DreamPiggy
34236ac522
Fix sd_colorAtPoint and sd_colorsWithRect support for grayscale image (white and alpha)
...
This fix the test cases for #3368
2022-07-16 17:27:04 +08:00
DreamPiggy
4d4e631183
Merge pull request #3370 from dreampiggy/bugfix_pdf_draw_bitmap_dpi
...
Fix the PDF image without thumbnailPixelSize will result huge bitmap size, now fixed into 72 DPI matching PDFKit
2022-07-14 15:24:11 +08:00
DreamPiggy
2fe3879b15
Fix the case that provided DPI cause `kCGImagePropertyPixelWidth` return non-zero value
...
This will cause re-check thumbnail, and may result the wrong pixel size
2022-07-14 14:52:26 +08:00
DreamPiggy
f1fe4ca8b8
Calculate the DPI based on PDF mediaBox, support thumbnailPixelSize
...
Move the vector code from ImageIOAnimatedCoder to ImageIOCoder, since it's not animatable :)
2022-07-13 18:18:21 +08:00
DreamPiggy
f91d35ef8d
Fix the PDF image without thumbnailPixelSize will result huge bitmap size, now fixed into 72 DPI matching PDFKit
2022-07-13 16:04:29 +08:00
DreamPiggy
c4b8660bb3
Bumped version to 5.13.0
...
update CHANGELOG
2022-06-27 02:37:44 +08:00
DreamPiggy
0805bc0f4d
Merge pull request #3364 from dreampiggy/bugfix_thumbnail_full_loading_same_time_cache_issue
...
Fix the issue when thumbnail and full size loading at the same time, the thumbnail image will write to memory with wrong key
2022-06-27 02:33:45 +08:00
DreamPiggy
3358859b46
Fix the issue when thumbnail first and full size loading at the same time, the thumbnail image will write to memory with wrong key
...
The disk cache key is correct and does not get effected by this issue
2022-06-27 02:17:48 +08:00
DreamPiggy
282714883e
Update the Demo project
2022-06-26 23:55:12 +08:00
DreamPiggy
16cf157658
Merge pull request #3363 from dreampiggy/fix_multiple_cancel_cache_callback_order
...
Fix the case when user cancel the image loading for same URL in sequence cause placeholder mass
2022-06-26 23:52:55 +08:00
DreamPiggy
ad953cdcc5
Fix the case when user cancel the image loading for same URL in sequence cause placeholder mass
...
This PR introduce 2 API changes:
1. Cache query now return cache token and callback sync when called from main queue, unlike NSOperation always callback async
2. Expose the set image operation, and update the documentation behavior about that `SDWebImageDelayPlaceholder`
2022-06-26 20:04:51 +08:00
DreamPiggy
d58a1006c2
Merge pull request #3362 from dreampiggy/behavior_thumbnail_store_cache
...
Feature: Change thumbnail cache behavior as expected, share cache through different loading pipeline without extra download
2022-06-26 15:29:55 +08:00
DreamPiggy
071a8934e3
Fix the assert case when loader callback nil image data
2022-06-26 00:29:24 +08:00
DreamPiggy
69acd5a158
Added all the 3 test cases
...
test17ThatThumbnailCacheQueryNotWriteToWrongKey
test18ThatThumbnailLoadingCanUseFullSizeCache
test19ThatDifferentThumbnailLoadShouldCallbackDifferentSize
2022-06-26 00:29:24 +08:00
DreamPiggy
31c4a09430
Fix one bug that callback the wrong cache type
2022-06-26 00:29:24 +08:00
DreamPiggy
c47158362d
Limit the re-deocde case only when image was downloaded, avoid when thumbnail hit cache
2022-06-26 00:29:24 +08:00
DreamPiggy
ecac56b726
Use the new solution, store the original decode options, when multiple loading pipeline share the same URL callback, check it and re-decode if needed
2022-06-26 00:29:24 +08:00
DreamPiggy
911328c1b4
Fix the case when previous pipeline use thumbnail transformer use together, second pipeline use the full size loading
2022-06-23 19:37:47 +08:00
DreamPiggy
2c9290f109
Added sd_isThumbnail to mark metadata, avoid the case when full size image request re-use the image from thumbnail decoding for the same URL
...
I think this is a temp workaround
2022-06-23 19:19:23 +08:00
DreamPiggy
e7e9268a7e
Fix the case that query full size key with thumbnail, cause the write back of thumnail to memory cache with wrong key
2022-06-23 17:54:27 +08:00
DreamPiggy
613a2bf988
Opt the thumbnail cache behavior, now it prefers to store/query original data from disk, thumbnail image from memory
...
Separate the thumbnail from transformer, they are for different use case
2022-06-23 17:12:56 +08:00
DreamPiggy
0b661344fe
Merge pull request #3359 from dreampiggy/api_thumbnail_scale_calculation
...
Added new API for custom coder better handling the thumbnail size
2022-06-22 17:56:22 +08:00
DreamPiggy
1f3ee8e9d5
Added new API for custom coder better handling the thumbnail size
...
The current WebP/HEIF/AVIF coder both copy paste the same code multiple times and have to fix one by one
2022-06-22 16:53:40 +08:00
DreamPiggy
19b4b47c60
Merge pull request #3357 from dreampiggy/bugfix_encode_max_pixel_size
...
Fix the encodeMaxPixelSize logic
2022-06-20 21:01:07 +08:00
DreamPiggy
018cf32ab3
Added test23ThatThumbnailEncodeCalculation test case
2022-06-20 18:20:34 +08:00
DreamPiggy
fcb53cb5ff
Fix the encodeMaxPixelSize logic
...
Allows user to provide size which one dimension is larger than image size size
Example - maxPixelSize: (200, 200), imageSize: (100, 400), result: (50, 200)
2022-06-20 18:12:09 +08:00
DreamPiggy
3746c5d4c6
Merge branch 'master' of https://github.com/SDWebImage/SDWebImage
2022-06-20 17:33:00 +08:00
DreamPiggy
9362505aeb
Merge pull request #3336 from Insofan/feat/store_data
...
feat: store image data
2022-06-20 17:18:42 +08:00
DreamPiggy
8743cdd633
Merge pull request #3355 from dreampiggy/feature_support_uiimage_preparefordisplay
...
Support using iOS 15 UIImage new API imageByPreparingForDisplay for faster force decoding
2022-06-20 17:17:10 +08:00
DreamPiggy
b729cc14f6
Bumped version to 5.12.6
...
update CHANGELOG
2022-06-12 18:28:19 +08:00
DreamPiggy
9b9fc6fc9b
Support using iOS 15 UIImage new API imageByPreparingForDisplay for faster force decoding
...
This API seems support both async/sync version, SD use sync version here because we already call them on global queue
The API mark available on watchOS, but header does not pass that __has_include, a little strange
2022-06-12 18:16:04 +08:00
DreamPiggy
eeb25d6e9c
Merge pull request #3354 from dreampiggy/bugfix_thumbnail_calculate
...
Fix the thumbnail pixel size calculation when preserveAspectRatio is true
2022-06-12 17:11:14 +08:00
DreamPiggy
a66972bdc8
Update SDImageCache.m
...
Little logic check for nil value
2022-06-12 17:10:23 +08:00