Commit Graph

638 Commits

Author SHA1 Message Date
Bogdan Poplauschi 8aca4ca1b3 Merge pull request #1363 from muer2000/patch-3
Fixed #1361 sd_cancelBackgroundImageLoadForState
2016-01-08 16:50:00 +02:00
Bogdan Poplauschi cac21e106d Fix #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of dispatch_apply 2016-01-08 16:50:35 +02:00
Valerio Mazzeo e709a04e89 added CMYK unsupported color space model 2015-12-30 15:45:14 +00:00
Shayan Yousefizadeh 95468315fc Fixes a bug where image scale & orientation are ignored when decoding / decompressing an image. 2015-11-17 18:24:48 +00:00
muer2000 40ad58571b Fixed #1361 sd_cancelBackgroundImageLoadForState
Fixed sd_cancelBackgroundImageLoadForState in sd_setBackgroundImageWithURL method
2015-11-12 15:45:47 +08:00
Oliver Eikemeier 92e38160d6 Fix compilation error introduced in commit 6406d8e526 2015-10-27 13:44:19 +01:00
yirenjun 2b57abd44a Create a strong ref of weakOperation in the entry of The image download subOperation, use the strong ref instead weakOperation 2015-10-26 14:45:36 +08:00
Bogdan Poplauschi 04a0431ae9 Making sure all access to self.runningOperations is synchronized 2015-10-25 19:35:26 +02:00
Bogdan Poplauschi ac98896099 Code style 2015-10-25 19:32:31 +02:00
Harish Krishnamurthy 6406d8e526 Modifies SDWebImagePrefetcher prefetching logic.
- Removes recursive calls to startPrefetchingAtIndex.
- Uses dispatch_apply with striding to optimize the performance.
2015-10-25 19:30:29 +02:00
Bogdan Poplauschi 5b05d6c3cc Replaced #1258 - Removing "and" from method names per https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html 2015-10-25 19:24:50 +02:00
Bogdan Poplauschi 53ef2dc3c3 Merge pull request #1340 from lagapollo/lagapollo-patch-1
Memory usage upgrade
2015-10-25 19:19:45 +02:00
Bogdan Poplauschi dcb7985c5c Replaced #1345 - Added urlCredential property to SDWebImageDownloader 2015-10-25 15:57:52 +02:00
Bogdan Poplauschi bf899e222f Fixed the error that was causing the Travis builds to fail
The issue was: since CocoaPods 0.38.0, the way pod headers are created on disk changed (see for example https://github.com/core-plot/core-plot/issues/204). This caused the webp/decode.h file to be unaccessible from CocoaPods installations. We could not change the import to libwebp/webp/decode.h since our git clone installation would then fail (as the path for that is Vendors/libwebp/src/webp). The solution was to rely on the COCOAPODS macro to make 2 different imports for Cocoapods and the other installation type.
2015-10-13 14:38:15 +03:00
102errors 233b6c2607 spelling 2015-10-09 18:21:44 +08:00
lagapollo 65fbc3b85a Memory usage upgrade
autorelease the bitmap context for clearing cache when memory warnings
2015-10-07 17:20:45 +02:00
Bogdan Poplauschi a16d007622 Updated #976 according to comments via review 2015-09-30 18:56:33 +03:00
Bogdan Poplauschi 577fefa26e Merge pull request #976 from ghazel/file-extension
append the original path extension to the hash filename. closes #967
2015-09-30 18:51:06 +03:00
initlife 5f0594f043 don't to perform download if url is "" but not nil
sometimes user may pass @"" as url to sdwebimage to download, now it will also run NSURLConnection and try to download, actually there is no need to do this. I think maybe use url.absoluteString.length == 0 to avoid that url is not nil but a empty string will be better
2015-09-30 10:58:17 +08:00
Konstantinos K. 2d748f1e2f Merge pull request #1321 from mythodeia/master
Added a new constructor to SDWebImagePrefetcher
2015-09-29 10:27:51 +03:00
KonstantinosK 944fd77965 Added a new constructor to SDWebImagePrefetcher
that allows it to be instantiated with any image manager
2015-09-29 10:27:09 +03:00
Konstantinos K. 3af1a30ebb Merge pull request #1280 from atsusy/fix-uiimage-gif
```UIGraphicsBeginImageContextWithOptions``` and ```UIGraphicsEndImageContext``` should be inside the loop for each image
2015-09-29 09:18:33 +03:00
Konstantinos K. 6a28dc7ae9 Merge pull request #1276 from arielelkin/patch-2
SDWebImagePrefetcher: remove logging
2015-09-29 08:38:33 +03:00
Konstantinos K. 7e6bd60176 Merge pull request #1297 from mythodeia/master
cleaner implementation of failedUrl error handling
2015-09-29 08:38:13 +03:00
Xenon 05ce156764 Added support for SDWebImageAvoidAutoSetImage option to UIButton and highlighted UIImageView 2015-09-23 04:23:11 +03:00
Konstantinos K. 60cab8b74c cleaner implementation of failedUrl error handling 2015-09-16 23:26:45 +03:00
Atsushi Kataoka 46c59183aa Fix sd_animatedImageByScalingAndCroppingToSize: 2015-09-02 11:12:59 +09:00
Ariel Elkin 6814af4ade SDWebImagePrefetcher: remove logging
Remove macro that checks for DEBUG, SD_VERBOSE, and SD_LOG_NONE
Remove calls to NSLog
2015-08-31 10:49:33 +02:00
Isaac Paul d00d368cdb Fix unsupported colorspace issue.
Without this fix, this url: https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png isn't correctly decoded and the method returns a nil image.. perhaps there should be a failsafe that checks the return value and returns the input image instead if the return value is nil.
2015-08-21 10:59:07 -04:00
Konstantinos K. 49f6e532b5 Merge pull request #1257 from Coeur/spelling
spelling
2015-08-16 18:29:54 +03:00
Antoine Cœur c011d1a88b spelling 2015-08-16 22:09:08 +08:00
Nathan Wong 6edface2c3 Fix typo "timeElasped" -> "timeElapsed" 2015-08-14 15:45:32 +01:00
mythodeia fb62c3fde1 better handling of colorspace models 2015-07-17 00:11:54 +03:00
mythodeia 25b4c178d9 progress reports on main thread 2015-07-15 23:56:05 +03:00
mythodeia df751e737b added option to disable memory cache
use this:
```shouldDisableMemoryCache``` to toggle memory cache
2015-07-15 11:35:03 +03:00
mythodeia a9ea132874 disable iCloud backup 2015-07-15 11:04:44 +03:00
mythodeia c68d585e49 activity indicator added
```
[cell.imageView setShowActivityIndicatorView:YES];
[cell.imageView setIndicatorStyle:UIActivityIndicatorViewStyleGray];
```
2015-07-15 10:50:04 +03:00
mythodeia 4cfb12c01c fix unsupported parameter combination issues
when CGBitmapContextCreate is called
2015-07-15 10:45:31 +03:00
mythodeia dcde40fc01 set as default the device's screen scale 2015-07-15 10:43:29 +03:00
Bogdan Poplauschi ba335fc7d5 Merge pull request #1153 from LukeDurrant/CustomDiskCachePath
Custom disk cache path
2015-07-13 22:18:55 +03:00
Bogdan Poplauschi 33c13e79ca Coding style updates 2015-07-13 22:18:33 +03:00
Bogdan Poplauschi f611d5e52b Merge pull request #1188 from bill350/master
Add an option called "SDWebImageAvoidAutoImageFill" to avoid automati…
2015-07-02 18:07:44 +03:00
Jean-Charles SORIN 4d6693c813 Rename SDWebImageAvoidAutoImageFill option to SDWebImageAvoidAutoSetImage 2015-07-01 10:11:35 +02:00
Bogdan Poplauschi b111d6246a Revert "Fixing casing for #import "webp/decode.h" (#import "WebP/decode.h") not"
This reverts commit 48d4adc210.
2015-06-29 11:41:32 +03:00
unLucio 48d4adc210 Fixing casing for #import "webp/decode.h" (#import "WebP/decode.h") not
working on case sensitive HDs
2015-06-25 11:04:55 +04:00
Bogdan Poplauschi 7e160e34a2 Merge pull request #1158 from akmarinov/master
Fixed an issue that causes URLs with trailing parameters to be assign…
2015-06-25 01:33:39 +03:00
Bogdan Poplauschi 466e4011d0 Merge pull request #1138 from KoCMoHaBTa/KoCMoHaBTa-patch-1074
Applied patch for issue #1074
2015-06-25 01:15:01 +03:00
Konstantinos K. 08e9962b5e Merge pull request #1167 from jiangmingz/patch-2
fix ImageIO: CGImageSourceCreateWithData data parameter is nil
2015-06-24 19:34:50 +03:00
Konstantinos K. 7692bd2610 Merge pull request #1178 from marciomeschini/marco/fix_accept_header
add webp accepted content type only if WebP enabled
2015-06-24 19:24:47 +03:00
Konstantinos K. 2ee4bfe24b Merge pull request #1159 from stephanecopin/errorCodeFailedURLs
Add handling for additional error codes that shouldn't be considered a permanent failure
2015-06-24 19:12:09 +03:00
Konstantinos K. 8021ddd313 Merge pull request #1121 from archfear/transparancy_fix
Fix for transparency being lost in transformed images.
2015-06-24 19:10:02 +03:00
stephane-fueled db4f3fc9b6 fix(): simplify logic for failed URLs error code on iOS6/7 2015-06-24 10:57:16 -04:00
stephane-fueled 4499441661 feat(failedURLs): add additional error codes that shouldn't be considered as a permanent failure 2015-06-24 10:54:58 -04:00
Marco Meschini e622b290c9 fix directive
apologies. yeah, #elseif was quite inappropriate for this case
2015-06-24 09:58:19 +01:00
Jean-Charles SORIN 5d2963ac73 Add an option called "SDWebImageAvoidAutoImageFill" to avoid automatic image addition in UIImageView and let developer to do it himself 2015-06-18 19:18:45 +02:00
Marco Meschini 26698f9da0 add webp accepted content type only if WebP enabled
Send WebP as accepted content type only if it is enabled. In case it's not, stick with the standard formats in order to avoid the server sending us back WebP images.
2015-06-12 17:04:33 +01:00
Konstantinos K. 8f3b5e9330 fixed typ in method description
should say asynchronously in methods ```removeImageForKey...```
2015-06-08 10:05:58 +03:00
拔萝卜的☂Tank be0791233c Update UIImage+MultiFormat.m
fix <Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil bug
2015-06-02 20:23:40 +08:00
Andrey Marinov 8f309e194e Fixed an issue that causes URLs with trailing parameters to be assigned an incorrect image scale value 2015-05-25 19:48:23 +03:00
Luke Durrant d7bc2c0036 Improved by using makeDiskCachePath 2015-05-20 17:30:23 +10:00
Luke Durrant 737140d4cb Added support for custom disk cache folder with fall back for caches directory 2015-05-20 17:28:06 +10:00
Olivier Poitrey 91b4251115 Merge pull request #1085 from flovilmart/AppExtensionSafe
Determines at runtime is UIApplication is available as per #1082
2015-05-17 21:06:19 -07:00
Olivier Poitrey 393d4f1601 Merge pull request #1143 from rromanchuk/feature/auto-purge-on-memory-event
Purge nscache on system memory notifications
2015-05-13 12:14:50 -07:00
Ryan Romanchuk 78be42ee3b Use subclassed NSCache 2015-05-13 11:03:13 -07:00
Ryan Romanchuk 4756d5dcbe Purge nscache on system memory notifications 2015-05-12 16:24:23 -07:00
Konstantinos K. a51688168d Merge pull request #1111 from molon/master
failedURLs can be removed at the appropriate time.
2015-05-12 08:37:14 +03:00
Ryan Romanchuk f72f4c183d Add NSCache countLimit property in attempts to get better control of cache eviction. 2015-05-11 11:02:33 -07:00
Milen Halachev 9f719ca2f9 Applied patch for issue #1074
When the code is copied within a swift module, or when a target is linked against the static library or when using from cocoapods - the debugger not longer gets broken.
2015-05-08 02:56:08 +03:00
molon 9ae8f97425 failedURLs can be removed at the appropriate time. 2015-04-08 18:24:52 +08:00
Dan Dofter 38a6edb02a Only store an image with unknown format as PNG if it has an alpha channel. 2015-04-02 17:50:20 -07:00
Pete Callaway 7e50d78c80 Don’t pass the original image data to be cached if the image has been transformed as transparency may have been added 2015-04-02 17:41:16 -07:00
Mike Pollard 4dd5a6681a Fix parenthesis to avoid crashes 2015-03-30 21:30:16 +01:00
Florent Vilmart a66a790eb2 Replaces direct calls to UIApplication by peformSelector 2015-03-20 18:37:55 -04:00
Florent Vilmart 17a4803661 Determines at runtime is UIApplication is available as per #1082 2015-03-20 15:29:28 -04:00
Bogdan Poplauschi 9620fffa64 @3x support - replaced #1005 2015-03-19 23:44:25 +02:00
Bogdan Poplauschi 2b68869927 Merge pull request #1075 from ikesyo/refactor-image-cache-cost
[Refactor] Implement cache cost calculation as a inline function
2015-03-19 14:23:33 +02:00
Bogdan Poplauschi d56c4f3d22 Merge pull request #1054 from heistings/develop
Use __typeof(self) when assigning weak reference for block.
2015-03-19 14:19:58 +02:00
Bogdan Poplauschi eac0b816f8 Merge pull request #1041 from john-07/master
allow override diskCachePath
2015-03-19 14:13:34 +02:00
Bogdan Poplauschi 88ee3c6774 Replacing #1018 - avoid warning "<Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil" if imageData is nil 2015-03-19 13:52:44 +02:00
Bogdan Poplauschi 6e947240a0 Merge pull request #1017 from warld-limited/prefetcher_patch
[Memory Issue] Clear SDWebImagePrefetcher progressBlock when it has completed
2015-03-19 13:47:17 +02:00
Bogdan Poplauschi 7f99c01804 Replaces #1016 2015-03-19 12:10:59 +02:00
Bogdan Poplauschi fb2063086d Merge pull request #985 from songfrank/master
Bug fix:Collection <__NSArrayM: > was mutated while being enumerated
2015-03-19 11:57:15 +02:00
Bogdan Poplauschi beabb1842b Merge pull request #988 from wantedly/improve-operation-behavior
Improve operation behavior
2015-03-19 11:54:01 +02:00
Bogdan Poplauschi 0ef0e07f77 Merge pull request #1011 from mattjgalloway/error_domain
Make a constant for the error domain
2015-03-19 10:55:59 +02:00
Syo Ikeda 210c13d124 [Refactor] Use NSMutableSet for failed URLs' storage instead of array 2015-03-18 12:33:28 +09:00
Syo Ikeda 021607a845 [Refactor] Implement cache cost calculation as a inline function 2015-03-18 12:27:23 +09:00
Bogdan Poplauschi fd34a9a0fa Revert "Fixed #774 - remove deprecated methods. Since 4.0 is a major release, we don't need the backwards compatible methods"
This reverts commit 62a8ee1ab6.
2015-03-17 15:55:16 +02:00
庞博 f83abb578a Use __typeof(self) when assigning weak reference for block.
Signed-off-by: 庞博 <bopang@sohu-inc.com>
2015-03-06 16:37:38 +08:00
Takeru Chuganji 62e2320f2d make sure inmutable 2015-02-26 09:23:08 +09:00
Olivier Poitrey 17c3cf3aa0 Merge pull request #996 from harishkashyap/fix-memory-issues
Adds option to decompress images and select prefetcher Queue
2015-02-25 07:54:44 -08:00
Takeru Chuganji ffa3962992 fix threading issue 2015-02-25 02:45:37 +09:00
Evgeny Petrov 6468a92f32 allow override diskCachePath 2015-02-16 15:56:30 +03:00
Naoki Morita ce73619640 Merge branch 'master' of github.com:rs/SDWebImage 2015-01-31 22:34:54 +09:00
Katsuma Ito 0e047941e9 Clear SDWebImagePrefetcher progressBlock when it has completed
If progressblock captures objects, captured objects remain until next SDWebImagePrefetcher works.
So, nil clear progressBlock as well as completionBlock.
2015-01-20 18:33:10 +08:00
Matt Galloway 761b00553b Make a constant for the error domain 2015-01-13 19:34:05 +00:00
Bogdan Poplauschi feca1e8d0d Merge pull request #987 from wantedly/fix-notification-dispatch
Fix NSNotificationCenter dispatch on subthreads.
2015-01-07 10:33:01 +02:00
Harish Krishnamurthy c59160e6da Reverts queue property to assign 2014-12-23 17:37:27 -05:00
Harish Krishnamurthy e97fea7233 Changes property of queue from weak to strong 2014-12-23 16:34:27 -05:00
Harish Krishnamurthy 4ceb6665b2 * Adds Queue options to SDWebImagePrefetcher.
* Adds option to decompress images in cache and post download.
2014-12-22 16:03:45 -05:00
Dick cded20c736 duplicate failed urls are added into failedURLs
fix bug when download image with option SDWebImageRetryFailed
2014-12-22 16:58:16 +08:00
Naoki Morita f7a2321107 Fix typo. 2014-12-16 12:35:17 +09:00
Naoki Morita d90d115893 Fix notification name. 2014-12-16 12:24:57 +09:00
Naoki Morita cd977d70a4 Improve operation behavior to get more information of it. 2014-12-16 11:48:26 +09:00
Naoki Morita 3d3471e490 Fix NSNotificationCenter dispatch on subthreads. 2014-12-16 10:52:34 +09:00
sfeng dad2a9254b Bug fix:Collection <__NSArrayM: > was mutated while being enumerated 2014-12-15 03:20:39 +08:00
Tony cee50eb648 Add url as param to progress block 2014-12-13 13:01:24 +08:00
Konstantinos K b271cbb371 initialise kPNGSignatureData data
in SDImageCache initWithNamespace method.
This ensures the kPNGSignatureData is always initialised even if the we
alloc SDImageCache without using the sharedImageCache singleton
2014-12-10 14:42:43 +02:00
Greg Hazel 9af7460f2b append the original path extension to the hash filename. closes #967 2014-12-06 13:06:29 -08:00
Bogdan Poplauschi 6698910fe1 Revert "Loading Indicator view with 2 lines of code"
This reverts commit 2cfa5ccb88.
2014-11-06 19:59:27 +02:00
mythodeia 2cfa5ccb88 Loading Indicator view with 2 lines of code
added support for UIActivityIndicatorView while the image is
downloaded, without adding extra ‘setImageWithUrl’ methods to the
UIImageView+WebCache category.
I used [this pull
request](https://github.com/mythodeia/UIActivityIndicator-for-SDWebImage
), original author is [JJSaccolo](https://github.com/JJSaccolo), and
modded it a bit to support loading indicator while the image is
downloading.

the usage is basically this right before the usual sd_setImage...
methods:
```
        // show activity indicator
        [cell.imageView setShowActivityIndicatorView:YES];
        // choose indicator style
        [cell.imageView
setIndicatorStyle:UIActivityIndicatorViewStyleGray];
```
2014-11-06 19:26:44 +02:00
Bogdan Poplauschi 914ed45a44 Merge pull request #941 from mishagray/cost_compute_fix
Cost compute fix
2014-11-02 23:55:23 +02:00
Bogdan Poplauschi b596c9c120 Merge pull request #942 from Krivoblotsky/master
'304 Not Modified' HTTP status code handling.
2014-11-02 23:52:10 +02:00
Bogdan Poplauschi 7f39e5e60e The code from SDWebImageDownloaderOperation connection:didFailWithError: should match the code from connectionDidFinishLoading:. This fixes #872 2014-11-02 23:20:16 +02:00
Bogdan Poplauschi 759f0b9a3e Merge pull request #897 from MrAlek/fix/max-concurrency-count
Increased default maxConcurrentOperationCount, fixes #527
2014-11-02 19:33:11 +02:00
Alek Åström 09b6ee941a Increased default maxConcurrentOperationCount, fixing issue #527 2014-11-02 18:06:17 +01:00
Serg Krivoblotsky 3d94e34415 304 http status code handling 2014-10-31 23:30:27 +02:00
Michael Gray dfd2e2a2f1 Merge commit '7d9337406760603ddee47d5515e1e4835618b6b2' into cost_compute_fix 2014-10-31 14:32:51 -04:00
Bogdan Poplauschi 1a3ccc2e8d Merge pull request #840 from foxling/master
fix #610 display progressive jpeg issue
2014-10-31 20:12:38 +02:00
Bogdan Poplauschi 125515d7f1 Merge pull request #876 from matias-pequeno/custom_operations
Allows user to override default SDWebImageDownloaderOperation
2014-10-31 20:08:45 +02:00
Bogdan Poplauschi a4c213ecbd Merge pull request #886 from hsoi/fix-implicit-atomicity-declaration
Fix implicit atomicity declaration of the SDWebImageManager.cacheKeyFilter
2014-10-31 20:05:25 +02:00
Bogdan Poplauschi c3c55784cb Merge pull request #936 from flexih/master
Decoding webp, depends on source image data alpha status.
2014-10-31 20:00:55 +02:00
Bogdan Poplauschi 52b2b70abf Merge pull request #937 from pavelosipov/master
Implement 'SDWebImageDownloaderAllowInvalidSSLCertificates' option.
2014-10-31 19:59:31 +02:00
Bogdan Poplauschi 62a8ee1ab6 Fixed #774 - remove deprecated methods. Since 4.0 is a major release, we don't need the backwards compatible methods 2014-10-31 19:12:42 +02:00
Pavel Osipov 75944258f0 Implement 'SDWebImageDownloaderAllowInvalidSSLCertificates' option. 2014-10-23 17:16:28 +04:00
flexih 83ad6fa977 Decoding webp, depends on source image data alpha status. 2014-10-23 12:14:43 +08:00
Alexis Creuzot 98082a6791 Handle empty urls NSArray
In some cases the user may end up with an empty urls NSArray, in which case the completion block is never called.
This commit handle such case to call immediately the completion block (if any)
2014-10-14 11:16:58 +02:00
Bogdan Poplauschi 2233b5e77d Merge pull request #896 from skrew/master
Update UIImageView+WebCache.m
2014-09-22 22:23:19 +03:00
Bogdan Poplauschi ee3c351abd Fixed #900 by adding a new flag SD_LOG_NONE that allows silencing the SD logs from the Prefetcher 2014-09-22 22:15:45 +03:00
eric@skrobs 54a772ebb9 Update UIImageView+WebCache.m
Can cause animation losing or crash if you are in a thread.
2014-09-12 20:03:34 +02:00
Brett Koonce 5284ac6623 minor spelling (forth->fourth) 2014-09-11 19:24:54 -07:00
John C. Daub 3c82278727 atomicity was implicit (compiler complained). Declared 'nonatomic' as that's fairly standard on iOS 2014-09-04 09:08:47 -05:00
Matias Pequeno 3671cdde0f Adds setter to override default SDWebImageDownloaderOperation. 2014-08-14 18:12:37 -07:00
Gabriele Petronella ec6b6e7267 More explicit error message in case of nil completedBlock
NSParameterAssert doesn't provide enough information for understanding the API misuse.
Pointing the API user to SDWebImagePrefetcher makes more sense, as a nil completedBlock most likely signifies the intention of prefetching the image.
2014-08-12 11:23:31 +02:00
Tony Arnold a31b9d46a1 Fix misnamed parameters in comment documentation 2014-08-11 17:27:05 +10:00
Bogdan Poplauschi 044abf402d Merge pull request #838 from justjimmy/master
fix cancelAll crash (Issue #809)
2014-08-06 19:20:47 +03:00
Andrew Shu a8c4fa48b7 Flag to transform animated images
Using a new SDWebImageOptions flag: SDWebImageTransformAnimatedImage
2014-08-04 01:42:12 -07:00
foxling b2909fb2da fix #610 2014-08-04 15:17:58 +08:00
Jimmy Lee 3587b8d1e0 fix cancelAll crash 2014-07-31 10:10:52 +10:00
Bogdan Poplauschi 7815923c48 Fixed other misspells from appledoc (additions to #829) 2014-07-23 16:15:16 +03:00
David Messing b9d9456e21 Fixed documentation spelling. 2014-07-23 08:59:52 -04:00
Bogdan Poplauschi e95224bf5f Temporary fix for #809, until we can figure out the cause of the crash 2014-07-23 08:13:25 +03:00
BB9z f6d7d60b98 Missing mark. 2014-07-22 16:58:08 +08:00
Bogdan Poplauschi 222e6bca0d Merge pull request #795 from xlchen/master
fix duplicate symbols when using with webp via pods
2014-07-21 15:32:45 +03:00
Bogdan Poplauschi 28109c4c70 Fixed SDWebImageCombinedOperation cancel crash (#798 #809) 2014-07-21 15:27:16 +03:00
mishagray 7d93374067 Modified the cost calculuations to appropriately compute the 'scale' of an image 2014-07-20 18:10:02 -04:00
Bogdan Poplauschi 681a7c4222 Merge pull request #819 from n13/master
guarding against image source == NULL
2014-07-18 16:21:16 +03:00
Nikolaus Heger 9faee5356c guarding against image source == NULL 2014-07-18 11:07:13 +07:00
Bogdan Poplauschi b88a552fba Updated all block params and properties, using defined blocks that have var names (for proper autocomplete). Created a SDWebImageNoParamsBlock to distinguish easier from other no params blocks. Fixes #810 2014-07-16 15:17:08 +03:00
Bogdan Poplauschi cd4b925448 Update to #732 to fix misspell (completion instead of completition) 2014-07-14 18:29:45 +03:00
Bogdan Poplauschi f080e38fb8 Replace #699 Fixed race condition in SDWebImageManager if one operation is cancelled, the completion block must not be called, otherwise it might race with a newer completion for the same object
Conflicts:
	SDWebImage/SDWebImageManager.m
2014-07-14 16:29:57 +03:00
Bogdan Poplauschi 6e4fbafa55 #625 In order to fix the deadlock, reviewed the `[SDImageCache diskImageExistsWithKey:]` method. Based on the Apple doc for NSFileManager, using the defaultManager without the dispatch on the ioQueue to avoid the deadlocks. This instance is thread safe. Also created an async variant of this method `[SDImageCache diskImageExistsWithKey:completion:]`
For consistency, added async methods in `SDWebImageManager` `cachedImageExistsForURL:completion:` and `diskImageExistsForURL:completion:`
2014-07-14 16:22:00 +03:00
Bogdan Poplauschi 0b47342b2f No need for explicit ivar and getters, as long as we have the @synthesize in place 2014-07-14 13:01:05 +03:00
Bogdan Poplauschi 39db378082 Merge pull request #783 from bpoplauschi/race_condition
Replace #621Fixed race condition between operation cancelation and loading finish
2014-07-11 09:57:28 +03:00
Vjy Anand 99590ed6ec Update MKAnnotationView+WebCache.m
Replace deprecated method call
2014-07-06 06:40:06 -04:00
gsempe 1fdaa4e7f8 Modify image data back when the image is too large and it has been scaled down 2014-06-30 20:00:44 +02:00
gsempe dc8da77aab Implement a complete down sizing algorithm to avoid memory warnings
Code copy from the Apple Sample code "Large Image Downsizing" https://developer.apple.com/Library/ios/samplecode/LargeImageDownsizing/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011173-Intro-DontLinkElementID_2
2014-06-30 19:52:55 +02:00
Bogdan Poplauschi 30e034d60d Fixed misspell 2014-06-30 00:07:32 +03:00
Bogdan Poplauschi 72a4e7b830 Replace #621Fixed race condition between operation cancelation and loading finish 2014-06-26 00:30:45 +03:00
Bogdan Poplauschi 30f672661c Added option to use the cached image instead of the placeholder for UIImageView. Replaces #541. Fixes #599 2014-06-26 00:27:56 +03:00
Bogdan Poplauschi a6f11b3ad7 Fixed #775, made sure all the category methods that are public have the sd_ prefix (deprecated the old ones)
-there were a few exceptions where I just renamed the methods since they were added in this method
2014-06-25 21:32:53 +03:00
Bogdan Poplauschi 23874cdca4 Update for #771 - instead of removing the old methods, deprecated them so we are backwards compatible. 2014-06-25 11:24:59 +03:00
Bogdan Poplauschi 6d01e80409 Added comments and coding style to previous pull request #771 2014-06-25 11:04:28 +03:00
Bogdan Poplauschi 9b18145e56 Merge pull request #771 from Whirlwind/new_cancel_logic
Refactor the cancel logic
2014-06-25 10:49:44 +03:00
Rok Gregorič 8d668b4121 Do not load placeholder image if SDWebImageDelayPlaceholder option specified. 2014-06-24 12:49:34 +02:00
Bogdan Poplauschi 50c4d1d2eb Implemented NTLM auth support. Replaced deprecated auth challenge methods from `NSURLConnectionDelegate`. Replaces #711.
- added `username` and `password` properties on `SDWebImageDownloader`
- added `shouldUseCredentialStorage` and `credential` properties on `SDWebImageDownloaderOperation`
- `SDWebImageDownloaderOperation` conforms to `NSURLConnectionDataDelegate` (it used to implement the methods, but didn't stated the protocol in the declaration)
- removed deprecated methods: `- connection:canAuthenticateAgainstProtectionSpace:` and `- connection:didReceiveAuthenticationChallenge:` with `- connectionShouldUseCredentialStorage:` and `- connection:willSendRequestForAuthenticationChallenge:`
- updated demo project to download one image the requires HTTP auth
2014-06-23 21:57:33 +03:00
Whirlwind 5615cf12de Merge branch 'master' into new_cancel_logic
Conflicts:
	SDWebImage/MKAnnotationView+WebCache.m
	SDWebImage/UIButton+WebCache.m
	SDWebImage/UIImageView+HighlightedWebCache.h
	SDWebImage/UIImageView+HighlightedWebCache.m
	SDWebImage/UIImageView+WebCache.m
2014-06-20 10:51:17 +08:00
Bogdan Poplauschi af3e4f87e4 Returning error in setImage completedBlock if the url was nil. Added `dispatch_main_async_safe` macro. Fixes #505 2014-06-19 23:24:08 +03:00
Bogdan Poplauschi eb91fdd3b8 Fixed issue #529 - if the `cacheKeyFilter` was set, this was ignored when computing the `scaledImageForKey`. For most of the developers that did not set `cacheKeyFilter`, the code will work exactly the same 2014-06-19 23:05:14 +03:00
Olivier Poitrey a8a69ab9b6 Merge pull request #770 from bpoplauschi/completion_with_url
Pass imageURL in completedBlock
2014-06-19 12:38:12 -07:00
Bogdan Poplauschi 136daba9df Added proper handling for SDWebImageDownloaderLowPriority (aka NSOperationQueuePriorityLow). Fixes #713 #745 2014-06-19 22:19:22 +03:00
Bogdan Poplauschi e116aa5ce0 Updated some older code to match the coding style 2014-06-19 21:58:20 +03:00
Bogdan Poplauschi ea663b9602 As discussed with @rs, prefixed all the new methods to sd_set* 2014-06-19 21:54:25 +03:00
Whirlwind 4c18545dbc Refactor the cancel logic 2014-06-19 22:46:37 +08:00
Bogdan Poplauschi 03a751430d Pass image URL in completion blocks - step 6:
- deprecated block type `SDWebImageCompletedBlock `, replaced with `SDWebImageCompletedBlock ` that contains NSURL* param
2014-06-19 12:27:08 +03:00
Bogdan Poplauschi 81b5e72a9c Pass image URL in completion blocks - step 5:
- deprecated all UIImageView(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on UIImageView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
2014-06-19 12:26:12 +03:00
Bogdan Poplauschi 21b230f28f Fixed misspell (downloand -> download) 2014-06-19 12:13:39 +03:00
Bogdan Poplauschi 76b552e21e Pass image URL in completion blocks - step 4:
- deprecated all UIImageView(HighlightedWebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created HighlightedWebCacheDeprecated category on UIImageView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
2014-06-19 12:12:58 +03:00
Bogdan Poplauschi c38409b813 Updated UIButton category documentation (forth param for the completion block) + alignaments 2014-06-19 12:04:07 +03:00
Bogdan Poplauschi 673fca9113 Documentation alignaments 2014-06-19 12:00:23 +03:00
Bogdan Poplauschi 939f68d27e Updated MKAnnotation view category documentation (forth param for the completion block) + alignaments 2014-06-19 11:55:02 +03:00
Bogdan Poplauschi 7108b4f404 Pass image URL in completion blocks - step 3:
- deprecated all UIButton(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on UIButton (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
2014-06-19 11:49:27 +03:00
Bogdan Poplauschi 654a9c98ea Pass image URL in completion blocks - step 2:
- created block type `SDWebImageCompletionBlock` that contains NSURL* param
- deprecated all MKAnnotationView(WebCache) `setImage*` methods. Replaced with `loadImage*` methods that use the `SDWebImageCompletionBlock` as completion block type
- created WebCacheDeprecated category on MKAnnotationView (to avoid collisions, we didn't name it Deprecated)
- replaced the usages of the deprecated items with the new ones
2014-06-19 11:32:28 +03:00
Bogdan Poplauschi 233ef65f98 Pass image URL in completion blocks - step 1:
- deprecated block type `SDWebImageCompletedWithFinishedBlock`, replaced with `SDWebImageCompletionWithFinishedBlock` that contains NSURL* param
- deprecated SDWebImageManager `-downloadWithURL:options:progress:completed:` method. Replaced with `downloadImageWithURL:options:progress:completed:` that uses the `SDWebImageCompletionWithFinishedBlock ` as completion block type
- created Deprecated category for SDWebImageManager containing the old method
- replaced the usages of the deprecated items with the new ones
2014-06-19 11:10:38 +03:00
Bogdan Poplauschi 99b7a090f8 Missing new line 2014-06-19 10:51:55 +03:00
Bogdan Poplauschi a8f5627052 Added doc description for the NSData category 2014-06-19 10:36:13 +03:00
Bogdan Poplauschi 455188355f Merge pull request #764 from n13/master
support for image orientation
2014-06-19 00:02:20 +03:00
gsempe f0732d704c Add option to scale down large images on iOS
Option is SDWebImageScaleDownLargeImage
2014-06-18 20:08:59 +02:00
Bogdan Poplauschi 9dcd68d5ee Merge pull request #751 from robertmryan/master
Avoid premature completion of prefetcher if request fails
2014-06-18 15:39:57 +03:00
Bogdan Poplauschi e4104942ee Return nil from SDScaledImageForKey if the input image is nil. Replaces #750. Fixes #365 2014-06-18 15:28:13 +03:00
Whirlwind 364f5c4d7a should not add url to failedURLs when timeout, cancel and so on. #707 2014-06-18 00:14:23 +08:00
Bogdan Poplauschi b81b7f9b4a Merge pull request #765 from Whirlwind/fix_highlight_error
fix UIImageView+HighlightedWebCache call error method
2014-06-17 19:08:28 +03:00
Bogdan Poplauschi 6c409cd8a0 Exposing the SDWebImageManager from the SDWebImagePrefetcher class. Fixes #394 2014-06-17 18:54:04 +03:00
Nikolaus Heger c76aba6c00 support for image orientation 2014-06-17 22:38:37 +07:00
Bogdan Poplauschi 2973aedd09 Merge pull request #683 from brynbodayle/master
Fixed issue where cancelled operations aren't removed from runningOperations.
2014-06-17 17:04:34 +03:00
Bogdan Poplauschi 0772019e4d SDWebImageManager uses the shared instance of SDWebImageDownloader. This was requested by several developers for easier setup of their downloads. Replaces #486 2014-06-16 18:21:06 +03:00
Diego Chohfi f5d0ddc270 #761 fixing potential bug when sending a nil url for UIButton+WebCache 2014-06-16 11:46:19 -03:00
Bogdan Poplauschi 689586f73a Merge pull request #687 from rokemoon/master
Create NSOperation when start operation.
2014-06-15 22:38:07 +03:00
Bogdan Poplauschi e6c0f56d1f Exposed cache paths - fixes #339 2014-06-15 22:23:48 +03:00
Bogdan Poplauschi a0bc09df7d Merge pull request #644 from kencoken/master
Added method to SDWebImageManager to check if an image exists in either ...
2014-06-15 18:29:23 +03:00
Bogdan Poplauschi 5fd21e5ce1 Exposed SDWebImageManager cacheKeyForURL 2014-06-15 18:08:32 +03:00