Commit Graph

122 Commits

Author SHA1 Message Date
Sebastian Rehnby d57b92cd0e Detect parent operation cancellation in download operation completion block 2013-02-26 12:08:55 +01:00
Nebil Kriedi fbf14d2e16 Prefetching file properties in the disk cleaning enumerator 2013-02-21 01:07:44 +00:00
MIYOKAWA, Nobuyoshi 15c5785320 correct cachePolicy constants.
NSMutableURLRequest accepts NSURLRequestCachePolicy as cachePolicy,
not NSURLCacheStoragePolicy.
2013-02-19 13:10:31 +09:00
Olivier Poitrey f024890ba7 Add (kinda) LIFO queue mode support for image downloading (fix #294) 2013-02-17 03:02:04 +01:00
Olivier Poitrey 350c0bea9a Add completion block support to `SDWebImagePrefetcher` (fix #127) 2013-02-17 02:43:46 +01:00
Olivier Poitrey ebd63a88c1 Add `SDWebImageManager` delegate allowing fine control of manager's cache-in
- `imageManager:shouldDownloadImageForURL:` let delegate to conditionaly block cache-in (fix #134)
- `imageManager:transformDownloadedImage:` let delegate to transform the image prior to cache-in (fix #63, fix #284)
2013-02-17 00:55:27 +01:00
Olivier Poitrey 6f198abd1b Add ability to set custom downloader HTTP headers (fix #171) 2013-02-16 23:33:41 +01:00
Olivier Poitrey 5f535602f1 Merge pull request #299 from Reflejo/master
Fix "Alpha on JPEG with no alpha" when decoding
2013-02-16 10:41:14 -08:00
Olivier Poitrey b27d5719c2 Synchronize access to SDWebImageManager's mutable structures (fix #301) 2013-02-16 17:49:27 +01:00
Martin Conte Mac Donell de19c24241 [BUG] Fix invalid alpha on JPEG files 2013-02-13 21:55:26 -03:00
Yasuhiro Inami 17cc72d5ab Add synchronous disk-cache loading method. 2013-02-13 19:07:56 +09:00
Olivier Poitrey de485a8618 Fix downloader queue using assign instead of strong under iOS 6 2013-02-12 01:17:55 +01:00
Olivier Poitrey 63178bde3c Revert "Fixed CGBitmapContextCreate warnings for invalid alpha properties"
This reverts commit 12196f4de6.
It adds alpha on JPEG with no alpha.
2013-02-07 18:15:16 +01:00
NachoSoto 42c7455776 Check SDWebImageCacheMemoryOnly for disk caching 2013-01-29 20:10:09 +00:00
Olivier Poitrey 0ee103263c Merge pull request #277 from Reflejo/upstream
Fixed CGBitmapContextCreate warnings for invalid alpha properties
2013-01-17 13:52:47 -08:00
Martin Conte Mac Donell 73884be367 Invalid cost calculation when saving image to memory cache 2013-01-17 15:49:19 -03:00
Martin Conte Mac Donell 12196f4de6 Fixed CGBitmapContextCreate warnings for invalid alpha properties 2013-01-17 15:14:40 -03:00
Reid Main 599636fa58 Removed creation of NSError when a nil URL is downloaded. 2013-01-16 22:22:33 -05:00
Reid Main b59b42e6b5 Fixed bug where NSInvalidArgumentException was thrown if an image with a nil URL was downloaded. 2013-01-16 14:53:38 -05:00
Olivier Poitrey 1e53e91513 Add imageFromMemoryCacheForKey: method to synchronously query the memory cache (fix #263) 2013-01-16 11:43:21 +01:00
Olivier Poitrey 555a320b9e Merge pull request #260 from kawanet/master
isRunning method added at SDWebImageManager
2013-01-16 02:26:04 -08:00
Matej Bukovinski e31b157394 Don't dispatch cancelAll calls.
- should fix pre-fetcher problems #247
- cancelAll should be always called using the main thread
2013-01-11 13:54:54 +01:00
Olivier Poitrey b398208beb Do not mark URLs a fail when error is due to missing network connection 2013-01-11 01:14:56 +01:00
Alex Burgel cfb65f2d75 Change SDWebImageManager to use shared image cache 2013-01-04 16:45:09 -05:00
kawanet e8b1532cba isRunning method added at SDWebImageManager 2012-12-25 22:02:48 +09:00
Olivier Poitrey c876cafa7a Fix Xcode 4.6 warnings 2012-12-19 16:41:06 +01:00
Olivier Poitrey 043eb14273 Fix an LLVM warning (fix #254) 2012-12-19 12:16:48 +01:00
Reid Main f800a52f1c Fixed bug where decodedImageWithImage: ignored image scale and orientation. 2012-12-15 17:59:00 -05:00
Matej Bukovinski 7ba77023c7 Using spaces instead of tabs for indentation.
- also configured the Xcode project to use spaces instead of tabs by default
2012-12-14 00:18:17 +01:00
Matej Bukovinski 85759911b7 Changed the expected size to -1 in the initial progress callback.
- simplifies callback code by removing possible division by 0 issues during progress computation
2012-12-14 00:18:00 +01:00
Matej Bukovinski b4fb940cbc Send out progress callbacks sooner.
- as soon as the NSURLConnection gets initialized
- helps to allocate and show progress indication sooner and prevent large delays without progress indication (for example when the server takes long to respond)
- estimated size is always 0 at this point, clients can use this to decide if they want to handle this callback or skip it
2012-12-14 00:17:24 +01:00
Matej Bukovinski 37f71de26c Using the source image's the color space for image decoding (fix #237)
Should fix most system warnings regarding invalid context configurations
2012-12-13 23:11:40 +01:00
Olivier Poitrey a94b3eca7c Fix typo (fix #246) 2012-12-11 23:36:55 +01:00
Olivier Poitrey d3b5fd2bd2 Fix ARC compilation warning breaking some non-ARC projects (fix #229) 2012-12-11 16:11:06 +01:00
Olivier Poitrey 84fe4a6669 Fix indentation tab/space 2012-12-10 15:30:54 +01:00
Olivier Poitrey 616d824dc7 Return an error if the downloaded image has no pixels (fix #241) 2012-12-10 15:30:54 +01:00
Olivier Poitrey 21ff7bd6ff Do not use GCD barrier for reading 2012-12-10 15:30:54 +01:00
Olivier Poitrey ddd03f7d2c Add some sanity check on the URL parameter 2012-11-29 18:52:28 +01:00
Olivier Poitrey 4284b5797e Remove no longer necessary cleanMemory on app going to background as NSCache does this by itself 2012-11-29 18:52:28 +01:00
Olivier Poitrey d487bccf5e Try to fix a random crash on dealloc 2012-11-29 18:52:28 +01:00
Olivier Poitrey 82faab82d3 Do not capture self in operations in categories 2012-11-29 18:52:28 +01:00
Olivier Poitrey 10c44577f6 Fix SDWebImagePrefetcher maxConcurrentDownloads property 2012-11-20 14:49:27 +01:00
Alex Barlow 44c6224763 Fix bug in SDWebImagePrefetcher where startPrefetchingAtIndex would never be called due to is always being 0 2012-11-20 14:45:34 +01:00
Olivier Poitrey a7af2a19e4 Try to fix decode image error message 2012-11-19 17:59:26 +01:00
Matej Bukovinski 9546c84f94 Making sure cache queries always callback in the main thread.
- queryDiskCacheForKey:done: now always invokes the callback in the main thread
- removed the now redundant main thread dispatch in the image manager class
2012-11-19 16:17:27 +01:00
Matej Bukovinski 713a83381f Resolved some downloader threading issues.
- callbacks could be released between the callback existence if check and invocation
- could be nilled out in a background thread call to done, while being prepared for invocation on the main thread
- now making sure done is always performed on the main thread
- also added some related threading fixes and optimizations
2012-11-19 16:17:20 +01:00
Matej Bukovinski 331053d26e Calling completion callbacks in the main thread.
- made sure this is true even if the downloader is used on its own
- SDWebImageManager doesn't need to perform a dispatch to the main thread any longer
2012-11-19 16:06:05 +01:00
Matej Bukovinski 9a3aff4851 Always making callbacks using the main thread.
Even if using the downloader directly without SDWebImageManager.
2012-11-19 16:03:39 +01:00
Matej Bukovinski ab185ea6e8 Implemented progress callbacks and related fixes. 2012-11-19 15:58:50 +01:00
Matej Bukovinski 2e8c02556a Passing the exact cache type in the completion block.
- none, disk and memory
- can still be used as a bool (if true there was a cache hit)
2012-11-19 15:55:09 +01:00