Commit Graph

1938 Commits

Author SHA1 Message Date
DreamPiggy 6622f29dac Merge branch 'refactor_coder_animation' into 5.x 2018-04-17 12:04:37 +08:00
DreamPiggy dd2e71c99d Add support for SDAnimatedImage imageNamed:bundle: for macOS, enable SDAnimatedImageTest for macOS 2018-04-17 12:03:24 +08:00
DreamPiggy d19311e08c Revert "Fix two warnings about losing precision in comparison"
This reverts commit a710bc5472.
2018-04-17 11:27:50 +08:00
DreamPiggy 56fea371b0 Fix compile issue 2018-04-17 11:10:53 +08:00
DreamPiggy a8639f9fd0 Use `NSTimeInterval` for age property, because it's more proper represent seconds 2018-04-17 11:09:56 +08:00
DreamPiggy 2d27300e00 Add test for custom memory cache and disk cache 2018-04-17 11:09:56 +08:00
DreamPiggy 62058d209d Add memory cache and disk cache protocol, make our image cache just like a wrapper to call the disk cache implementation 2018-04-17 11:09:56 +08:00
DreamPiggy c5647c8f8a
Merge pull request #2283 from dreampiggy/feature_force_decode_individual_request
Use `SDWebImageAvoidDecodeImage` to allow user to control force decode feature for individual image request
2018-04-16 16:59:50 +08:00
DreamPiggy 781c079a3a Use `SDWebImageAvoidDecodeImage` to allow user to control force decode feature for individual image request. Replace all the central control for `decompressImages` 2018-04-16 01:12:09 +08:00
DreamPiggy 1367b18b89 Merge branch 'feature_scale_factor' into 5.x 2018-04-15 13:52:03 +08:00
DreamPiggy 5665b6fdf2 Fix the issue about scale factor using `initWithCGImage:size` macOS, we should always use `NSBitmapImageRep` to keep cross-platform compatible 2018-04-15 13:49:42 +08:00
DreamPiggy d02c8d15e2 Use the scale category from `NSImage+Addtions` instead of manual created property for `SDAnimatedImage` on macOS 2018-04-15 13:13:51 +08:00
DreamPiggy 94b67bf3b0 Fix the NSSecureCoding implementation for SDAnimatedImage 2018-04-15 01:36:10 +08:00
DreamPiggy fcfca57463 Add limitBytes arg for UIImage+ForceDecode category 2018-04-14 22:33:19 +08:00
DreamPiggy 0dfeebefeb Add `SDImageCacheScaleDownLargeImages` to allow cache to scale down large images if need 2018-04-14 22:14:59 +08:00
DreamPiggy 3d7896f663 Adopt the current cache key filter and cache serializer to support using in context options. Using a protocol based object store block instead block itself. 2018-04-14 18:18:45 +08:00
DreamPiggy 7272cf78e5 Fix the silly mistake that view category internal completion block call swapped cacheType and finished arg 2018-04-14 16:59:34 +08:00
DreamPiggy 95ace107e8
Merge pull request #2277 from dreampiggy/refactor_cache_revert_handle_disk_error
Revert "Merge pull request #1898 from walkline/master into 5.x"
2018-04-13 17:32:29 +08:00
DreamPiggy e1d96e7812 Revert "Merge pull request #1898 from walkline/master into 5.x" 2018-04-13 16:48:15 +08:00
DreamPiggy db646df3f1
Merge pull request #2276 from dreampiggy/refactor_cache_path_api
Refactor cache - Cache Path API
2018-04-13 11:48:03 +08:00
DreamPiggy f8e9dd3412 Update the test for cache path API 2018-04-13 11:19:03 +08:00
DreamPiggy 25b61bb5ae Refactor the cache path API. Only given the full cache path to allow user to choose to use filename or full path. And use a block instead of static array for additional cache path. 2018-04-13 11:10:14 +08:00
DreamPiggy e829637a30 Update to use scale factor instead of that firstFrameOnly, since it's not used frequently as scale 2018-04-13 02:34:52 +08:00
DreamPiggy b9773d09c0 Fix SDGetColorFromPixel ignore kCGImageAlphaOnly case 2018-04-13 02:15:18 +08:00
DreamPiggy eaf7bece7a Merge branch 'bugfix_indicator' into 5.x 2018-04-13 01:17:43 +08:00
DreamPiggy 7701215ae0 Fix the bug that reset indicator view does not remove from super view 2018-04-13 01:17:13 +08:00
DreamPiggy dfe4a66424 Fix the thread-safe issue for coders manager. Use lock and immutable object to keep `addCoder`, `removeCoder` thread-safe. 2018-04-12 13:40:10 +08:00
DreamPiggy a710bc5472 Fix two warnings about losing precision in comparison 2018-04-12 01:19:06 +08:00
DreamPiggy d515a36337 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
# Conflicts:
#	SDWebImage/SDWebImageImageIOCoder.m
2018-04-12 01:16:34 +08:00
DreamPiggy 2cb03773db
Merge pull request #2261 from dreampiggy/feature_request_modifier_and_response
Feature request modifier and response
2018-04-11 16:51:28 +08:00
DreamPiggy e549e1abeb
Merge pull request #2272 from dreampiggy/fix_force_decode_alpha
Fix that force decode not works for alpha-channel images.
2018-04-11 16:40:21 +08:00
DreamPiggy 46e5b196f8 Fix the test about alpha images force decode 2018-04-11 16:10:41 +08:00
DreamPiggy 49cecfe34a Fix that force decode not works for alpha-channel images. This should only exclude animated images. All other images should use the display alpha info based on whether contains alpha or not to force decode 2018-04-11 14:15:27 +08:00
DreamPiggy b726d55436
Merge pull request #2271 from dreampiggy/performance_image_orientation
Remove the extra calculation of image orientation for ImageIO coder & Fix macOS image orientation
2018-04-11 14:03:43 +08:00
DreamPiggy e2c99f437d Remove the extra category method for `NSBitmapImageRep`. Only use `NSImage`'s native API to manage it 2018-04-11 12:57:46 +08:00
DreamPiggy cebf72d6d5 Refactor API. Change that `imageRef` arg description to `CGImage` to match the common design pattern and make it clear to Swift user 2018-04-11 11:32:43 +08:00
DreamPiggy 7d50d61b37 Update the NSImage+Addtions to allow specify a image orientation when using `CGImage`. Update all the place we use 2018-04-10 22:51:28 +08:00
DreamPiggy acbdb8c374 Add helper method in coder helper to create decoded CGImage to specify orientation. The existing method just call with Up orientation 2018-04-10 21:19:12 +08:00
DreamPiggy b9ec481edf Remove the extra calculation of image orientation for ImageIO coder 2018-04-10 21:19:12 +08:00
Bogdan Poplauschi 8801138fb2 Updated README.md to reflect the 5.x changes to the supported platforms and backward compatibility 2018-04-10 13:54:19 +03:00
DreamPiggy fa59de5f76 Merge branch 'refactor_coder_animation' into 5.x 2018-04-09 14:43:21 +08:00
DreamPiggy 0705a973be Update to import sd_isDecoded to avoid extra decode. And change exif orientation to CGImagePropertyOrientation define 2018-04-09 14:22:47 +08:00
DreamPiggy 22c293738a Update the progressive coder/ animated coder init API, which pass the options to support extensibility 2018-04-09 13:42:52 +08:00
DreamPiggy 02dfed984e
Merge pull request #2266 from dreampiggy/feature_scale_factor
Feature scale factor
2018-04-08 21:50:44 +08:00
DreamPiggy cbf8581696 Fix the scale factor issue on macOS using helper methods to match the behavior of UIKit. Also remove the unused API on NSImage category 2018-04-08 19:54:39 +08:00
DreamPiggy 1a3fb834a0 Add SDScaledImageForScaleFactor, make the API more clear. Fix the scale factor option issue 2018-04-08 00:50:19 +08:00
DreamPiggy 7a84e59eb1 Add the context option SDWebImageContextImageScaleFactor to custom a scale factor which is not based on the cache key. 2018-04-07 23:47:41 +08:00
DreamPiggy fea3a56d71 Add a SDWebImageCoderDecodeScaleFactor option to specify scale factor using for decoder. Since the scale information is not stored into image data itself, but generated from image file name & metadata. 2018-04-07 23:21:16 +08:00
DreamPiggy 55256d0091 Use a protocol instance instead of block for request modifier. This can solve the problem that Swift user is hard to grab the block back stored in dictionary. 2018-04-07 15:56:34 +08:00
DreamPiggy fa7d19c099 Update the comments and expose the token's request, which can be used for advanced usage. 2018-04-07 15:52:39 +08:00