Commit Graph

1501 Commits

Author SHA1 Message Date
DreamPiggy dbc6b6995d
Merge pull request #2116 from dreampiggy/feature_invalidate_SDWebImageDownloader
Add a public API to allow user to invalidate URLSession used in SDWebImageDownloader to avoid memory leak on non-singleton instance
2017-11-28 20:17:57 +08:00
DreamPiggy d9aaf001ca Grab the poster image instead of image itself to avoid an UIAnimatedImage been set 2017-11-27 11:40:46 +08:00
DreamPiggy f8142a1b8f Update the documents 2017-11-27 00:50:29 +08:00
DreamPiggy a7c8ce5864 Update tests to invalidate session after usage 2017-11-27 00:37:20 +08:00
DreamPiggy ae96351439 Add a public API to allow user to invalidate URLSession used in SDWebImageDownloader to avoid memory leak on non-singleton instance 2017-11-27 00:36:31 +08:00
DreamPiggy 09750dcd2a For FLAnimatedImageView, Use dispatch_group to maintain setImageBlock and completionBlock order. Ensure that completionBlock is called after that animatedImage created 2017-11-17 15:58:43 +08:00
DreamPiggy a9551b8591 Provide another way to enhance FLAnimatedImageView performance fog GIF images 2017-11-16 19:43:36 +08:00
DreamPiggy 7b649a8bbf Revert changes for FLAnimatedImage performance enhancement.
Keep the refactored code for future maintain
2017-11-16 18:32:45 +08:00
Bogdan Poplauschi 5872bd660b
Merge pull request #2101 from dreampiggy/performance_byte_align
Byte Alignment to 64 bytes to reduce memory usage
2017-11-11 08:43:21 +02:00
DreamPiggy 81a7c3a160 Byte Alignment to 64 bytes to let Core Animation not to call extra aligned_malloc and reduce memory usage 2017-11-11 05:12:58 +08:00
Bogdan Poplauschi 0f73155d09 Bumped version to 4.2.2 + updated CHANGELOG 2017-11-07 09:21:55 +02:00
Bogdan Poplauschi 6972e600ec
Merge pull request #2096 from dreampiggy/demo_iOS_progress
Update our iOS demo to modern way, add a UIProgressView to show image download progress
2017-11-05 12:27:52 +02:00
Bogdan Poplauschi 8f04ef7394
Merge pull request #2095 from dreampiggy/fix_progressive_webp_decode_y_zero
Fix WebP progressive decoding may do extra calculate
2017-11-05 12:24:39 +02:00
DreamPiggy 17616c999b Embedded SDWebImage framework to all platforms in our demo project to allow real device run because it’s a dynamic framework 2017-11-05 17:23:35 +08:00
DreamPiggy dfe68a5db6 Update demo to use modern way of image assets, and view layout for rotation 2017-11-05 15:23:32 +08:00
DreamPiggy 2dd61393ed Fix “linking against dylib not safe for use in application extensions” warning for watch extension demo 2017-11-05 07:58:44 +08:00
DreamPiggy 8e46c13bcd Add empty launch storyboard to allow view on iPhone X 2017-11-05 07:58:05 +08:00
DreamPiggy efb7c4ebf9 Update our iOS demo to modern way, add a UIProgressView to show image download progress 2017-11-05 07:22:26 +08:00
DreamPiggy 98f020f610 Fix WebP progressive decoding may do extra calculate because that libwebp will output last_y to zero, which means current image data is not enough to decode first stride 2017-11-05 06:46:24 +08:00
Bogdan Poplauschi 821c2f3b8a
Merge pull request #2093 from dreampiggy/fix_completion_block_memory_called_next_runloop
Fix that completion block and set image block are called asynchronously for UIView+WebCache
2017-11-03 23:49:28 +02:00
DreamPiggy 0eff98e4e7 Fix that completion block and set image block are called asynchronously in UIView+WebCache. Add a more common macro to do current queue check 2017-11-04 04:16:33 +08:00
Bogdan Poplauschi b2e5317666 Bumped version to 4.2.1, updated CHANGELOG 2017-10-31 20:39:19 +02:00
DreamPiggy 19f45a3cf4 Feature refactor built-in coders and support animated webp on macOS (#2082)
* Refactor code. Move the C global function to a new SDWebImageCoderHelper class.

1. Create two method for animated image parse. Provide the way to allow animates on macOS
2. Create a new class called SDWebImageFrame to allow abstract usage for animated image
3. Fix EXIF orientation method will crash on iOS 7 because it’s a iOS 8 above API

* Change sd_imageLoopCount to retrieve GIF loop count for NSImage on macOS

* Adopt the refactor code, change our build-in coder with that coder helper method to reduce complexity

* Update the demo project on macOS to show animated WebP
2017-10-31 20:34:05 +02:00
Bogdan Poplauschi 3064ef6889 Merge pull request #2081 from dreampiggy/fix_heic_detector
Add all 4 standard HEIC brand file signature, ftypheic & ftypheix is for single image, ftyphevc & ftyphevx is for sequence image
2017-10-27 17:46:09 +03:00
DreamPiggy a71b7b63c4 Add all 4 standard HEIC brand file signature, ftypheic & ftypheix is for single image, ftyphevc & ftyphevx is for sequence image 2017-10-27 17:13:42 +08:00
Bogdan Poplauschi 28d21d28b9 Updated CHANGELOG 2017-10-27 09:46:56 +03:00
Bogdan Poplauschi 3d8ce3a84a Updated `SDWebImageImageIOCoder` comments + minor coding style 2017-10-27 09:44:35 +03:00
Bogdan Poplauschi 62f80e0e3a Merge pull request #2080 from dreampiggy/feature_heif_image_format
Add image format detect of HEIC (One type of HEIF which use HEVC codec). This is supported natively in iOS 11 & macOS 10.13
2017-10-27 09:29:32 +03:00
DreamPiggy decb5dcdeb Add some more comments about coder method 2017-10-27 00:22:58 +08:00
DreamPiggy ae67c97320 Provide a way to detect HEIC encoding compatibility. So that we can avoid encoding to this format. 2017-10-26 23:51:26 +08:00
DreamPiggy 4f7116afe9 Add image format detect of HEIC (One type of HEIF which use HEVC codec). This is supported natively in iOS 11 & macOS 10.13 2017-10-26 22:33:24 +08:00
Bogdan Poplauschi 292078c0be Merge pull request #2079 from rs/fix_progressive_coder_is_always_IO
Fixed create progressive coder issue
2017-10-25 21:02:50 +03:00
Bogdan Poplauschi 5773bfec07 Fixed create progressive coder issue
Because we don't break when we find the 1st coder that can decode progressively, we will always rewrite the `progressiveCoder ` with an `SDWebImageIOCoder` instance
2017-10-25 19:48:36 +03:00
DreamPiggy 85cb2fd6ad Creating FLAnimatedImage in global queue to improve displaying gif performance (#2047)
* Creating FLAnimatedImage in global queue to improve displaying gif performance
* Added `context` dictionary param to `sd_internalSetImageWithURL` that allows sending context options. For now, one can pass `SDWebImageInternalSetImageInGlobalQueueKey` with true value so the `setImage` op is executed on a global queue.
2017-10-25 09:05:46 +03:00
Bogdan Poplauschi 6bab618acc Merge pull request #2074 from dreampiggy/fix_scale_down_and_set_data
For ImageIO coder, if the image is scaled down, then we need to modify the original image data pointer
2017-10-24 09:22:27 +03:00
DreamPiggy d62e965833 For ImageIO coder, if the image is scaled down, then we need to modify the original image data pointer 2017-10-24 02:48:50 +08:00
Bogdan Poplauschi cd37ef672b Preparing for 4.2.0 release: bumped versions and updated the CHANGELOG 2017-10-23 20:35:34 +03:00
Bogdan Poplauschi 66289772b5 Merge pull request #2071 from dreampiggy/macOS_isGIF_implementation
Implements -[NSImage isGIF] method to return whether current NSImage is GIF representation.
2017-10-21 19:02:30 +03:00
DreamPiggy 30fd6cc6ab Implements -[NSImage isGIF] method to return whether current NSImage is GIF representation. 2017-10-21 23:31:31 +08:00
Bogdan Poplauschi 04855c945e Merge pull request #2061 from dvkch/master
Cached image filename are sometimes generated with invalid path extensions
2017-10-21 17:15:11 +03:00
Bogdan Poplauschi 83e2c35f8e Merge pull request #2068 from bpoplauschi/improve_unit_tests
Fixed our tests and improved the code coverage
2017-10-21 16:42:46 +03:00
Bogdan Poplauschi b12ef07e5e Merge pull request #2048 from dreampiggy/fix_cancelBlock_multi_thread_issue
Fix #1941 by placing a lock to avoid multi-thread issue for SDWebImageCombinedOperation cancelBlock
2017-10-21 16:32:39 +03:00
Bogdan Poplauschi f55635de1a Accidentally deleted a comma from an array declaration 2017-10-20 22:32:48 +03:00
Bogdan Poplauschi ed411dcba9 Finally fixed the tests from `SDImageCacheTests` so we can re-enable `test40InsertionOfImageData`
- the problems: some tests were just poorly written, using async calls but not properly setting async expectations. Those were generating undefined behaviour (not clear if/when those callbacks would be executed).
- also, we wanted to call `clearAllCaches` before every test, but since some methods there are async, this doesn't work with the way `setUp` was designed. So basically sometimes before a test we could clear the cache but sometimes not, or even the clear could come while running the test which was worst
- decided to fix this by making sure after every test that we manually clear what we have added.
2017-10-20 21:14:25 +03:00
Bogdan Poplauschi 86151183f6 Switched all the tests from using https://s3.amazonaws.com/fast-image-cache/demo-images/* images which are big and sometimes fail to arrive in 5 seconds (before the test can timeout) to smaller images, basically using http://via.placeholder.com/ like http://via.placeholder.com/50x50.jpg or http://via.placeholder.com/200x200.png
This should speed up the tests a bit and also avoid some of the random failures due to timeout
2017-10-20 20:29:18 +03:00
Bogdan Poplauschi 90c90a06bc Refactored the `SDWebImageDecoderTests` a bit. Per DRY, created `verifyCoder:withLocalImageURL:isAnimatedImage:` method that will take a imageURL and a coder and will check decoding and encoding back and forth, sizes and so. Reusing this method for the static WebP image, for the animated WebP image and for the GIF. 2017-10-20 18:40:09 +03:00
Bogdan Poplauschi f57c21d52a Improved the code coverage of our unit tests (given that we disabled test40InsertionOfImageData).
Also updated the Tests Podfile so we don't get a warning (xcodeproj was renamed to project)
2017-10-20 16:15:38 +03:00
Bogdan Poplauschi 30275b4415 Merge pull request #2067 from dreampiggy/feature_gif_encoding_macOS
Add the animated GIF encoding support for SDWebImageGIFCoder on macOS(use NSImage's API)
2017-10-19 20:51:06 +03:00
Bogdan Poplauschi 5804934a69 Merge pull request #2066 from dreampiggy/fix_progressive_webp_height_issue
Provide a way to fix libwebp’s bug during WebP progressive decoding f…
2017-10-19 20:50:21 +03:00
Bogdan Poplauschi 05828742e8 Just disabled this test test40InsertionOfImageData - keeps failing for unknown reasons (strangely sometimes the data doesn't get written to disk) 2017-10-19 19:15:21 +03:00