Commit Graph

483 Commits

Author SHA1 Message Date
DreamPiggy 1c92951110 Fix the unit test about out-of-date behavior 2023-07-31 10:39:48 +08:00
DreamPiggy 7e78633845
Merge pull request #3575 from dreampiggy/bugfix/CGImageCreateScale
Fix the CGImageCreateScaled to support 16/32 bit depth CGImage (RGB161616) and always preserve pixel format info
2023-07-29 21:59:26 +08:00
DreamPiggy 68c5808581 Added the complicated unit test `test22CGImageCreateScaledWithSize`
Test RGB888/RGB16/ARGB8888/RGB16/RGBF works on CGImageCreateScaled, because it's Foundation of coder plugin for thumbnail processing
2023-07-28 23:45:23 +08:00
DreamPiggy 480f3b5158 Update test case `test27ThatEncodeWithFramesWorks` 2023-07-26 23:04:02 +08:00
DreamPiggy 8dbf8ed97a Disable the test case testSDGraphicsImageRenderer on GitHub actions because it does not connect to a display
Only run on local Mac
2023-07-17 15:32:03 +08:00
yang f9e6cc288c Add test cases for bug #3564 2023-07-15 00:33:58 +08:00
DreamPiggy 633996a807 Fix the test case 2023-07-14 00:22:14 +08:00
DreamPiggy 8efa42e6bc Code garden for test cases 2023-07-14 00:03:06 +08:00
DreamPiggy 808cedc7e5 Rename to use struct to return the alignment, preserve for future HDR support 2023-07-13 23:41:09 +08:00
DreamPiggy 45b497c5f6 Fix the macOS force decode colorspace does not match screen colorspace and cause copy
Fix the NSColor should still convert to sRGB for print...
2023-07-13 23:31:19 +08:00
DreamPiggy 3e382b234d Fix the handle to context option and add test case 2023-07-13 22:58:32 +08:00
DreamPiggy 1a61c8d2d9 Update test case for SDImageForceDecodePolicyAutomatic 2023-07-13 22:58:32 +08:00
DreamPiggy 69c98c5f71 Added test case `test28ThatNotTriggerCACopyImage` and `test28ThatDoTriggerCACopyImage` 2023-07-13 22:58:32 +08:00
DreamPiggy ef69460dc7 Fix the test case test26AnimatedImageStopAnimatingClearBuffer 2023-05-09 16:50:41 +08:00
DreamPiggy eb8b62b170 Fix the test case `test57SDImageCachesManagerOperationPolicySerial` that remove the cache path directory 2023-04-21 20:39:49 +08:00
DreamPiggy 748def0a0c
Merge pull request #3496 from dreampiggy/temp/try_fix_promotion
Try to fix the SDAnimatedImageView playback speed issue in Promotion devices (iPhone Pro)
2023-02-18 19:36:15 +08:00
DreamPiggy 3440b7c0fb Update test case for display link and revert the protect code 2023-02-18 18:04:01 +08:00
DreamPiggy 9bc5207979 Added test case `test31ThatMultipleRequestForSameURLFailedCallback` to ensure behavior 2023-02-18 17:33:59 +08:00
DreamPiggy f2d7610181 Change Objc BOOL true/false into correct YES/NO 2023-02-07 02:32:11 +08:00
DreamPiggy 02969011b0 Try to fix the SDAsyncBlockOperation's race condition
Use the correct way for subclassing NSOperation
2023-02-06 21:05:51 +08:00
DreamPiggy 1ec6cd06f7 Change all placeholder.com sample from http into https 2023-02-06 18:56:25 +08:00
DreamPiggy b6910be155 Added test case `test31ThatMultipleRequestForSameURLNeverSkipCallback` to ensure all download request for same url always callback 2023-02-06 18:52:46 +08:00
DreamPiggy 975502b4a6
Merge pull request #3469 from dreampiggy/feat/animated_image_encode
Added encodeWithFrames API for animation encoding in custom coder, better for usage
2023-01-17 16:50:50 +08:00
DreamPiggy 9dd8b6c08b Update test case 2023-01-17 16:50:16 +08:00
DreamPiggy 985c84be75 Opt the macOS legacy animated encode, with the weak assigned frames to avoid re-decode again
It's still recommended to use the new API
2023-01-17 16:16:09 +08:00
DreamPiggy 911a9a86a0 Fix the wrong test because now ioQueue and encodeQueue is different thing, we should not assume calling storeImage and queryDiskCache get the data (they are not guarded by the same serial queue) 2023-01-12 15:56:08 +08:00
DreamPiggy 78fa0a9cb5 Update test case test08ThatImageTransformerWork with encode options 2023-01-11 16:38:00 +08:00
DreamPiggy 397f851240 Update test case 2023-01-09 22:14:53 +08:00
DreamPiggy 007100d18f Supports the old store cache API without context, which does not supports callback queue customization 2023-01-09 22:08:48 +08:00
DreamPiggy 1b086711ae Fix the issue because of main queue label hack 2023-01-09 22:08:48 +08:00
DreamPiggy 43d74211c3 Added test case `testSDCallbackQueue` 2023-01-09 22:08:48 +08:00
DreamPiggy 8be9f2c3f9
Merge pull request #3461 from dreampiggy/bugfix/yuv420_jpeg_hevc
Fix the iOS 15+ force-decode hack break Apple's HEIF and JPEG YUV420 optimization
2022-12-27 19:57:48 +08:00
DreamPiggy a53eb92988 Update the test case `test23ThatThumbnailEncodeCalculation`
This regression test should also been reverted
2022-12-27 19:23:58 +08:00
DreamPiggy ffc91663bf Added test case `test48CacheUseConcurrentIOQueue` 2022-12-27 17:37:07 +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 f8d353b50c Update test case `test06ThatUsingACustomDownloaderOperationWorks` 2022-11-08 20:04:36 +08:00
DreamPiggy 6a9b578369 Added test case `test21ThatQueryOriginalDiskCacheFromThumbnailShouldNotWriteBackDiskCache` 2022-11-08 18:51:47 +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 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 851b60e0f3 Added test case `test20ThatContextPassDecodeOptionsWorks` 2022-10-30 17:55:16 +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 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 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 364034d11a Fix test cases `test15CancelQueryShouldCallbackOnceInSync` 2022-09-26 18:43:26 +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 2729096221 Added test case `test15CancelQueryShouldCallbackOnceInSync` 2022-07-23 21:26:18 +08:00
DreamPiggy 1ed76f4f47 Fix the bitmapInfo support for greyscale color, update test case 2022-07-16 17:43:48 +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 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 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 018cf32ab3 Added test23ThatThumbnailEncodeCalculation test case 2022-06-20 18:20:34 +08:00
DreamPiggy 3b0b232616 Added test case test22ThatThumbnailPreserveAspectRatio 2022-06-12 16:44:21 +08:00
DreamPiggy 368825eff6 Update the test case, now when using force decode, the image orientation is always UP 2022-03-15 22:56:03 +08:00
DreamPiggy ba66c41fd6
Merge pull request #3332 from dreampiggy/workaround_prefer_input_cgimage_bitmap_info
Workaround the iOS 15+ Force Decode may return black image because of CoreGraphics
2022-03-08 15:17:04 +08:00
lizhuoli 3eb553d251 Update the test case again for checking non-blank image 2022-03-04 17:55:07 +08:00
lizhuoli 6dcbec2b87 Update the test case and use Xcode 13.2.1 with iOS 15.3+ simulator 2022-03-04 11:37:44 +08:00
lizhuoli 64902962e3 Fix the test case by adding a little inaccuracy for blur effect result 2022-03-03 21:49:49 +08:00
lizhuoli 4589048fdd Fix the some transform test case does not check the color hex 2022-03-03 19:43:59 +08:00
soondl 4302777c6f Add test case `testUIImageViewSetImageWithURLDiskSync` 2022-02-20 19:01:12 +09:00
ty0x2333 33ff352d4e Add test case: test07ThatDecodeAndScaleDownAlwaysCompleteRendering 2022-01-26 15:46:21 +08:00
lizhuoli c0fbe7e3ef Update test case 2021-10-18 21:44:01 +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 490644e027 apply github actions 2021-10-09 16:30:38 +08:00
kinarobin 22c9a4e549 fix test error in tvos 2021-10-08 10:33:57 +08:00
kinarobin 3d108c86a1 fix test error in macos 2021-10-07 18:30:38 +08:00
kinarobin 25f9d15b57 fix warning in uttype for ios15 2021-10-07 18:15:59 +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 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 e83b76946a Update the test for sync version API as well 2021-05-21 15:13:07 +08:00
kinarobin 426830d55f change to AWebP 2021-05-21 14:57:14 +08:00
kinarobin 22cd94d08a fix wrong memory cast in _UIAnimatedImage 2021-05-21 14:06:26 +08:00
DreamPiggy 43219b0739 Added test case `test29AcceptableStatusCodeAndContentType` 2021-05-07 16:26:52 +08:00
DreamPiggy bed1638b42 Revert the "Don't encode/decode image when app will terminate" 2021-04-06 18:21:16 +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 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 d277514cbe Added `test28ProgressiveDownloadShouldUseSameCoder` 2021-03-04 21:09:22 +08:00
kinarobin e52686b452 change to IOAnimatedCoder 2021-01-02 21:27:05 +08:00
kinarobin 872b59e32a Merge branch 'fix-ImageIO-encode/decode-crash' of https://github.com/kinarobin/SDWebImage into fix-ImageIO-encode/decode-crash 2021-01-02 18:12:30 +08:00
kinarobin 8ab5eb29cd add test case 2021-01-02 18:11:57 +08:00
DreamPiggy d8961a3e32 Remove the custom NSURLErrorCancelled case when URLSession task been cancelled 2020-12-25 14:32:38 +08:00
DreamPiggy d92c6cd945 Update the test case to check the return error domain and code 2020-12-24 14:52:36 +08:00
DreamPiggy 7313599a6c Added test case `test27DownloadShouldCallbackWhenURLSessionRunning` 2020-12-24 14:35:32 +08:00
DreamPiggy 775f6e0578 Update test case test35AnimatedImagePlaybackModeReversedBounce 2020-11-25 16:34:53 +08:00
DreamPiggy 99c59ac52b Update test case to make it more solid 2020-11-22 12:57:32 +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
DreamPiggy f65ab801d0 Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into gif 2020-11-20 18:50:14 +08:00
DreamPiggy 6453c6a2a2 Fix the test case to use a longer timeout 2020-11-20 18:49:20 +08:00
DreamPiggy 9b48425a77 Modify the test case `test17ThatMinimumProgressIntervalWorks` to make it more robust on CI environment 2020-11-20 18:25:32 +08:00
DreamPiggy 7a61a3339e Fix the random test case failure because when running next test case, previous test case's animation does not stop 2020-11-20 18:07:27 +08:00
Insomnia 6ecc8c5541 mod: animated test 33 2020-11-20 17:04:14 +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