Skip to content

Loading…

Webp detect #604

Merged
merged 3 commits into from

2 participants

@akhenakh
Collaborator

explicitly detection for webp format and call sd_imageWithWebPData only in that case

@rs rs merged commit 6aca6a2 into rs:master
@jbradforddillon jbradforddillon referenced this pull request in doubleencore/SDWebImage
@jbradforddillon jbradforddillon Squashed commit of the following:
commit 1a2435f335000cba2abea77590c9f9659be9ad86
Merge: 988fe14 9cc8269
Author: Brad Dillon <jbradforddillon@gmail.com>
Date:   Mon Mar 2 11:00:02 2015 -0500

    Merge branch 'master' of github.com:rs/SDWebImage into merge

    Conflicts:
    	README.md
    	SDWebImage.xcodeproj/project.pbxproj
    	SDWebImage/MKAnnotationView+WebCache.h
    	SDWebImage/MKAnnotationView+WebCache.m
    	SDWebImage/NSData+ImageContentType.h
    	SDWebImage/NSData+ImageContentType.m
    	SDWebImage/SDImageCache.h
    	SDWebImage/SDImageCache.m
    	SDWebImage/SDWebImageDownloader.h
    	SDWebImage/SDWebImageDownloader.m
    	SDWebImage/SDWebImageDownloaderOperation.h
    	SDWebImage/SDWebImageDownloaderOperation.m
    	SDWebImage/SDWebImageManager.h
    	SDWebImage/SDWebImageManager.m
    	SDWebImage/SDWebImagePrefetcher.h
    	SDWebImage/SDWebImagePrefetcher.m
    	SDWebImage/UIButton+WebCache.h
    	SDWebImage/UIButton+WebCache.m
    	SDWebImage/UIImage+WebP.m
    	SDWebImage/UIImageView+HighlightedWebCache.h
    	SDWebImage/UIImageView+HighlightedWebCache.m
    	SDWebImage/UIImageView+WebCache.h
    	SDWebImage/UIImageView+WebCache.m
    	Tests/Podfile
    	Tests/SDWebImage Tests.xcodeproj/project.pbxproj
    	Tests/Tests/SDImageCacheTests.m
    	Tests/Tests/SDWebImageManagerTests.m
    	Tests/Tests/UIImageMultiFormatTests.m

commit 9cc8269dcdcf7dc5fd42abb5adbd911b835bb21b
Merge: 17c3cf3 62e2320
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed Feb 25 17:04:13 2015 -0800

    Merge pull request #1049 from hoppenichu/fix_donwloader_2

    Make sure callbacksForURL won't be modified

commit 62e2320f2d69ddb7ef585e32c937a4345bcf437c
Author: Takeru Chuganji <takeru@hoppenichu.com>
Date:   Thu Feb 26 09:23:08 2015 +0900

    make sure inmutable

commit 17c3cf3aa0e67369985ca9b5b9ecf6b5e565cb3a
Merge: 0f157d4 c59160e
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed Feb 25 07:54:44 2015 -0800

    Merge pull request #996 from harishkashyap/fix-memory-issues

    Adds option to decompress images and select prefetcher Queue

commit 0f157d43322a3d891f9c3e40b8343f59a60983be
Merge: feca1e8 f8c7b90
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Feb 24 21:53:57 2015 -0800

    Merge pull request #1046 from hoppenichu/fix_downloader

    Fix SDWebImageDownloader threading issue

commit f8c7b9014c4e77bb3901469d254dfaa2c556cd9f
Author: Takeru Chuganji <takeru@hoppenichu.com>
Date:   Wed Feb 25 10:50:08 2015 +0900

    Specify Expecta Version

commit ffa396299216e2f4b1c5644e816dd3420fb2112d
Author: Takeru Chuganji <takeru@hoppenichu.com>
Date:   Wed Feb 25 02:45:37 2015 +0900

    fix threading issue

commit feca1e8d0d6ed2a70baeb45f849033f1b137d34b
Merge: 21656fa 3d3471e
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Jan 7 10:33:01 2015 +0200

    Merge pull request #987 from wantedly/fix-notification-dispatch

    Fix NSNotificationCenter dispatch on subthreads.

commit c59160e6dacdc931ac0d63a91342ca095c1a8796
Author: Harish Krishnamurthy <hkrishnamurthy@wayfair.com>
Date:   Tue Dec 23 17:37:27 2014 -0500

    Reverts queue property to assign

commit e97fea7233111d5ba11bc0d4313df2a1302a236a
Author: Harish Krishnamurthy <hkrishnamurthy@wayfair.com>
Date:   Tue Dec 23 16:34:27 2014 -0500

    Changes property of queue from weak to strong

commit 4ceb6665b2cc1a6d0f0077456069952f684d0f15
Author: Harish Krishnamurthy <hkrishnamurthy@wayfair.com>
Date:   Mon Dec 22 16:03:45 2014 -0500

    * Adds Queue options to SDWebImagePrefetcher.
    * Adds option to decompress images in cache and post download.

commit 21656fad68084e682a18eb638077989351a7cb52
Merge: 0db489b cded20c
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Dec 22 11:12:36 2014 +0200

    Merge pull request #994 from initlifeinc/master

    duplicate failed urls are added into failedURLs

commit cded20c736de2fcb7c801bdcb3c2626cb98772d3
Author: Dick <initlife.inc@gmail.com>
Date:   Mon Dec 22 16:58:16 2014 +0800

    duplicate failed urls are added into failedURLs

    fix bug when download image with option SDWebImageRetryFailed

commit 0db489b32e948cb6f79446b26c0a406445d951e7
Merge: 6b137fb 0ae0e34
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri Dec 19 11:11:42 2014 -0800

    Merge pull request #991 from sammcd/patch-1

    Update README.md

commit 0ae0e34642a0b43e1ae1984846e2bf11d21292ea
Author: Sam McDonald <sam@sammcd.com>
Date:   Fri Dec 19 10:14:08 2014 -0800

    Update README.md

    Picky spelling fix.

commit 6b137fb8ba8b73dff5aebafb2486997373f6703b
Merge: 6698910 b271cbb
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Dec 17 10:52:23 2014 +0200

    Merge pull request #981 from mythodeia/master

    initialise kPNGSignatureData data

commit 3d3471e4907e99e4c03962186b939ed5ef37b0be
Author: Naoki Morita <naoki@wantedly.com>
Date:   Tue Dec 16 10:52:34 2014 +0900

    Fix NSNotificationCenter dispatch on subthreads.

commit b271cbb371f4e98cc5de8ee9c310690bfee1ee65
Author: Konstantinos K <mythodeia@users.noreply.github.com>
Date:   Wed Dec 10 14:42:43 2014 +0200

    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

commit 6698910fe12076bc25b4956fa09b311c94235dbe
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Nov 6 19:59:27 2014 +0200

    Revert "Loading Indicator view with 2 lines of code"

    This reverts commit 2cfa5ccb883191df510ad15df2a97a765b9d5e82.

commit 2cfa5ccb883191df510ad15df2a97a765b9d5e82
Author: mythodeia <mythodeia@users.noreply.github.com>
Date:   Thu Nov 6 19:26:44 2014 +0200

    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];
    ```

commit afd1931c529faa73b341c5561b3488a6db546b06
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Thu Nov 6 14:20:35 2014 +0200

    Updated Readme with git clone command

commit 0aa9b61bcca20ef3e389bc46aee3ebfbbca362bd
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 13:52:11 2014 +0200

    Everything worked except the tests, trying using xcodebuild instead of xctool

commit 542fc29808e5db3b29952092e4d2b08656242543
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 13:44:45 2014 +0200

    Another try with Travis CI, this time no clean action, as it fails with
      xcodebuild build clean
    Scheme Tests is not currently configured for the clean action.

commit 87384290a42090be5888550459ca5ce7d6b9e918
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 12:45:04 2014 +0200

    Moved all schemes to the workspace container plus created scheme for Tests

commit 0b50b57c133f857bb7e57419bcbf2bfd6fab36ca
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 12:28:49 2014 +0200

    Reverted last change, doesn't work with Travis CI

commit 55f4beade56ad10eab3469f8483b9979c5ece01a
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 12:22:59 2014 +0200

    Updated Travis CI config, making sure xctool is installed

commit ef9a2798a7baa0e13327d0e438fe89049b60e5a8
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 12:16:25 2014 +0200

    Updated Travis CI script, replaced xcpretty with xctool

commit 01931d1d890889d5c18e93bf62d7870db56c047c
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Nov 4 10:55:59 2014 +0200

    Updated libwebp reference to 0.4.2

commit 914ed45a4434ca7a007d7cea5e20d10c0db9c34e
Merge: b596c9c dfd2e2a
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Nov 2 23:55:23 2014 +0200

    Merge pull request #941 from mishagray/cost_compute_fix

    Cost compute fix

commit b596c9c120601415f40493ca42b01ed5e52fc15f
Merge: 7f39e5e 3d94e34
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Nov 2 23:52:10 2014 +0200

    Merge pull request #942 from Krivoblotsky/master

    '304 Not Modified' HTTP status code handling.

commit 7f39e5e60e76a99537733c8c8eef8c14b00890c5
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Sun Nov 2 23:20:16 2014 +0200

    The code from SDWebImageDownloaderOperation connection:didFailWithError: should match the code from connectionDidFinishLoading:. This fixes #872

commit 936f47c00524af66385c0dbd196d2f35566ae708
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Sun Nov 2 22:53:45 2014 +0200

    Added Travis CI configuration file

commit d9d9ceedf46f5dfa05a752848ee69dc8341ba7da
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Sun Nov 2 22:53:32 2014 +0200

    Updated the Tests project after updating to CocoaPods 0.34.4

commit 759f0b9a3e974f269da97b4737e9a5762b96e377
Merge: 1a3ccc2 09b6ee9
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Nov 2 19:33:11 2014 +0200

    Merge pull request #897 from MrAlek/fix/max-concurrency-count

    Increased default maxConcurrentOperationCount, fixes #527

commit 09b6ee941ac492a8f3c056be17d951ba390f97e8
Author: Alek Åström <alek.astrom@gmail.com>
Date:   Sun Sep 14 13:57:48 2014 +0200

    Increased default maxConcurrentOperationCount, fixing issue #527

commit 3d94e34415ff4120506ca6ea8f6108ef44d60a45
Author: Serg Krivoblotsky <krivoblotsky@me.com>
Date:   Fri Oct 31 23:30:27 2014 +0200

    304 http status code handling

commit dfd2e2a2f14af6878af6ba30dc92ec1d85de84d2
Merge: 1a3ccc2 7d93374
Author: Michael Gray <michael.gray@voxability.com>
Date:   Fri Oct 31 14:32:51 2014 -0400

    Merge commit '7d9337406760603ddee47d5515e1e4835618b6b2' into cost_compute_fix

commit 1a3ccc2e8d55414253200a7484a3f587a389e8e4
Merge: 125515d b2909fb
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 20:12:38 2014 +0200

    Merge pull request #840 from foxling/master

    fix #610 display progressive jpeg issue

commit 125515d7f1f2de65b022c9700ce4fd15161b1fb3
Merge: a4c213e 3671cdd
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 20:08:45 2014 +0200

    Merge pull request #876 from matias-pequeno/custom_operations

    Allows user to override default SDWebImageDownloaderOperation

commit a4c213ecbd53081992973c665a6f2cf92e50c046
Merge: b0ff851 3c82278
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 20:05:25 2014 +0200

    Merge pull request #886 from hsoi/fix-implicit-atomicity-declaration

    Fix implicit atomicity declaration of the SDWebImageManager.cacheKeyFilter

commit b0ff8516ab6bc5a27884d45cb770cd7f492edc06
Merge: c3c5578 66a6873
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 20:02:42 2014 +0200

    Merge pull request #898 from mattjgalloway/xctest_async

    Switch to built in XCTest async

commit c3c55784cbc37aa5c6ab9abb8dd01c2623251def
Merge: 52b2b70 83ad6fa
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 20:00:55 2014 +0200

    Merge pull request #936 from flexih/master

    Decoding webp, depends on source image data alpha status.

commit 52b2b70abff4a83d7d1e77499511ae21799c4dc8
Merge: 62a8ee1 7594425
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Oct 31 19:59:31 2014 +0200

    Merge pull request #937 from pavelosipov/master

    Implement 'SDWebImageDownloaderAllowInvalidSSLCertificates' option.

commit 62a8ee1ab6ba3cd6a7fb87fc04f87ebd012ebd82
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Oct 31 19:12:42 2014 +0200

    Fixed #774 - remove deprecated methods. Since 4.0 is a major release, we don't need the backwards compatible methods

commit 75944258f0110ac0d4e97ac8a04c7b53225eb5c0
Author: Pavel Osipov <p.osipov@corp.mail.ru>
Date:   Thu Oct 23 17:16:28 2014 +0400

    Implement 'SDWebImageDownloaderAllowInvalidSSLCertificates' option.

commit 83ad6fa97739374eb89743d7b19ee0baf03fa53d
Author: flexih <flexih@gmail.com>
Date:   Thu Oct 23 12:14:43 2014 +0800

    Decoding webp, depends on source image data alpha status.

commit d2da4d0df478eb9348c96a92b1d356ef062c89da
Merge: 2233b5e 98082a6
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Oct 14 07:14:45 2014 -0700

    Merge pull request #929 from kirualex/patch-2

    Handle empty urls NSArray

commit 98082a679192c46b246d8d650f3be31e0d4b2e94
Author: Alexis Creuzot <kirualex@gmail.com>
Date:   Tue Oct 14 11:16:58 2014 +0200

    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)

commit 2233b5e77de655bdc718507602cfdd61b698b618
Merge: ee3c351 54a772e
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Sep 22 22:23:19 2014 +0300

    Merge pull request #896 from skrew/master

    Update UIImageView+WebCache.m

commit ee3c351abd92bef760310757f59c391363bcaf15
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Sep 22 22:15:45 2014 +0300

    Fixed #900 by adding a new flag SD_LOG_NONE that allows silencing the SD logs from the Prefetcher

commit 66a6873b2c7deccc71e9f5bb412601dbde217b03
Author: Matt Galloway <mattjgalloway@fb.com>
Date:   Mon Sep 15 11:55:12 2014 +0100

    Switch to built in XCTest async

commit 54a772ebb93a74eb782e88eb71d1c0e301603101
Author: eric@skrobs <skrew@rootmail.org>
Date:   Fri Sep 12 20:03:34 2014 +0200

    Update UIImageView+WebCache.m

    Can cause animation losing or crash if you are in a thread.

commit 5f4d7f44b484e7c9ccf06739fd4451cb1f2c730a
Merge: 43af50c 5284ac6
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Sep 12 09:45:33 2014 +0300

    Merge pull request #893 from asparagui/sp_fixes

    minor spelling (forth->fourth)

commit 5284ac66238f28406a305747523b6c1312f41856
Author: Brett Koonce <koonce@gmail.com>
Date:   Thu Sep 11 19:24:54 2014 -0700

    minor spelling (forth->fourth)

commit 43af50c5558f6e888381bc1711dba641edf9f6f1
Merge: 11125c4 013ccba
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Thu Sep 11 09:41:42 2014 +0300

    Merge pull request #890 from kyleclegg/master

    Updated key filter sample code

commit 013ccba57b9949642175283517dba83fe0e14d5c
Author: Kyle Clegg <kyle.clegg@gmail.com>
Date:   Wed Sep 10 12:51:25 2014 -0600

    Updated code sample to not use deprecated api

commit 3c82278727b5f40aff18166f37215d6bfc05b23d
Author: John C. Daub <hsoi@hsoi.com>
Date:   Thu Sep 4 09:08:47 2014 -0500

    atomicity was implicit (compiler complained). Declared 'nonatomic' as that's fairly standard on iOS

commit 11125c4379e514549e2617665c0b31063b4153df
Merge: 6dfec7c 249adae
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Sep 1 16:09:36 2014 +0300

    Merge pull request #879 from dulgan/patch-1

    Adding a flag for Cocoa Pods users

commit 249adae4f0b8394e2100979801869af9f9bdb960
Author: dulgan <antoine.harlin@gmail.com>
Date:   Wed Aug 27 14:10:27 2014 +0200

    Adding a flag for Cocoa Pods users

    Using the Parse framework and SDWebImage frameworks installed via Cocoa Pods gives the same error as described in the Alternatively section of the Add Linker Flag section in this Readme.
    I found a solution here : http://www.deanmao.com/2012/12/31/linker-error-using-cocoapods/

commit 3671cdde0f4d9f5749be15f6fd118bcc5f6840a2
Author: Matias Pequeno <matias.pequeno@gmail.com>
Date:   Thu Aug 14 18:12:37 2014 -0700

    Adds setter to override default SDWebImageDownloaderOperation.

commit 6dfec7ccd9992b78e635b035cab908139cb07fd5
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Aug 12 13:59:40 2014 +0300

    Updated README.md with CocoaDocs link

commit 15cda1b561920f8d24874eb7529f52acebf0a3fe
Merge: 16eea9f ec6b6e7
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Aug 12 12:26:01 2014 +0300

    Merge pull request #854 from Gabro/patch-1

    More explicit error message in case of nil completedBlock

commit ec6b6e72675ae73fbcdc88d075ddfe9fe3d91009
Author: Gabriele Petronella <gabriele.petronella@gmail.com>
Date:   Tue Aug 12 11:23:31 2014 +0200

    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.

commit 16eea9f104a85a63bbb1ede08524af7eb29cfb0f
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Aug 11 15:00:19 2014 +0300

    Updated references to libwebp files after the changes from their latest release (0.4.1)

commit 8bf39a9263c9593d153f2362f5220a8dbc5f3690
Merge: f104185 a31b9d4
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Aug 11 10:31:45 2014 +0300

    Merge pull request #850 from tonyarnold/fix-comment-documentation

    Fix misnamed parameters in comment documentation

commit a31b9d46a1ba823a34c91648c3c9428d5776c3e5
Author: Tony Arnold <tony@thecocoabots.com>
Date:   Mon Aug 11 17:27:05 2014 +1000

    Fix misnamed parameters in comment documentation

commit f1041856d0144a92bf1a4554ac1ff8f8553da76f
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Aug 8 18:12:59 2014 +0300

    Updated libwebp reference to 0.4.1 (this fixed the arm64 build issues)

commit 044abf402d470b5da0941eb20334de18fa910dae
Merge: 55c7c6c 3587b8d
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Aug 6 19:20:47 2014 +0300

    Merge pull request #838 from justjimmy/master

    fix cancelAll crash (Issue #809)

commit 55c7c6c8e149507ffe5f5167f237241a4dc1aff2
Merge: 2eef774 a8c4fa4
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Aug 4 11:47:06 2014 +0300

    Merge pull request #703 from talklittle/master

    Flag to transform animated images

commit a8c4fa48b796c583b06e77a40a2f6b3e66315d01
Author: Andrew Shu <talklittle@gmail.com>
Date:   Wed Apr 30 14:05:37 2014 -0700

    Flag to transform animated images

    Using a new SDWebImageOptions flag: SDWebImageTransformAnimatedImage

commit b2909fb2da513019da200ae33b51ba51b03564fb
Author: foxling <i.foxling@gmail.com>
Date:   Mon Aug 4 15:17:58 2014 +0800

    fix #610

commit 3587b8d1e0f51710dfd1cec0c3a723048f7473f4
Author: Jimmy Lee <just.jimmy@gmail.com>
Date:   Thu Jul 31 10:10:52 2014 +1000

    fix cancelAll crash

commit 2eef774eaefbe6f2fe1e0c495f6972bf119888c4
Merge: 7815923 bf6be42
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Jul 28 13:47:42 2014 +0300

    Merge pull request #836 from reiz/master

    Add Reference & Dependency Badges

commit bf6be426f336996710d81e2252da97a3246c645f
Author: Robert Reiz <robert.reiz.81@gmail.com>
Date:   Sat Jul 26 10:45:46 2014 +0200

    Add References Badge to Readme

commit 934c9cc96ddc910cd9e52d851380ccb0fe25bef4
Author: Robert Reiz <robert.reiz.81@gmail.com>
Date:   Sat Jul 26 10:44:56 2014 +0200

    Add Dependency Badge

commit 7815923c4859dd6234522c308e78543c3fc120bf
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jul 23 16:15:16 2014 +0300

    Fixed other misspells from appledoc (additions to #829)

commit 101ee70d944e7d237f5b7fbd2f2d23073cd9a437
Merge: 959e8db 3bb13ef
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Jul 23 16:12:02 2014 +0300

    Merge pull request #829 from davemess/master

    Fix documentation spelling

commit 3bb13ef34a6735ba547e8db664c6baaf41025736
Merge: 959e8db b9d9456
Author: David Messing <david.messing@gmail.com>
Date:   Wed Jul 23 09:00:03 2014 -0400

    Merge branch 'branch-misspell'

commit b9d9456e21a903b9005acbc688706e3f63a78e13
Author: David Messing <david.messing@gmail.com>
Date:   Wed Jul 23 08:59:52 2014 -0400

    Fixed documentation spelling.

commit 959e8db914bf821ad02f48be954998042cdc2aa8
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jul 23 08:17:14 2014 +0300

    Bumped podspec version

commit e95224bf5f54dd27a8bbcfdb464ee0001255dda8
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jul 23 08:13:25 2014 +0300

    Temporary fix for #809, until we can figure out the cause of the crash

commit f96302b42746490589e4c2cef4ea74669d41572c
Merge: 222e6bc f6d7d60
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jul 22 12:17:09 2014 +0300

    Merge pull request #827 from BB9z/fix/pargma-mark

    Missing mark.

commit f6d7d60b984668f31848bac62bd75ed72167f89c
Author: BB9z <bb9z@me.com>
Date:   Tue Jul 22 16:58:08 2014 +0800

    Missing mark.

commit 222e6bca0db8ade21fa0f41ad017a16aa8ff2f9e
Merge: 28109c4 c335e1f
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Jul 21 15:32:45 2014 +0300

    Merge pull request #795 from xlchen/master

    fix duplicate symbols when using with webp via pods

commit 28109c4c706fae230f35115cb8d5a26775a0eeed
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jul 21 15:27:16 2014 +0300

    Fixed SDWebImageCombinedOperation cancel crash (#798 #809)

commit 7d9337406760603ddee47d5515e1e4835618b6b2
Author: mishagray <michael.gray@voxability.com>
Date:   Sun Jul 20 18:10:02 2014 -0400

    Modified the cost calculuations to appropriately compute the 'scale' of an image

commit c8df858f7516f5a43b917e6344c8fc4b5bf5300c
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jul 18 16:56:32 2014 +0300

    Added test for the UIImage+MultiFormat crash

commit 681a7c4222bc816a15f955377dbfe5c492d365cc
Merge: b88a552 9faee53
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Jul 18 16:21:16 2014 +0300

    Merge pull request #819 from n13/master

    guarding against image source == NULL

commit 9faee5356cbc615c75d6e57af570bc4be6fda03d
Author: Nikolaus Heger <nheger@gmail.com>
Date:   Fri Jul 18 11:07:13 2014 +0700

    guarding against image source == NULL

commit b88a552fbaa5cbdb907de6f75959ea5df0e035e0
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jul 16 15:17:08 2014 +0300

    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

commit cd4b925448c828be7492e132e4b3690301fd30b7
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jul 14 18:29:45 2014 +0300

    Update to #732 to fix misspell (completion instead of completition)

commit db252d36547232f0604bcb063bb6da95fca7b65a
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jul 14 18:12:07 2014 +0300

    Updated podspec version to 3.7.0

commit f080e38fb8e77027617d854a02c0e9df487fdabd
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Jun 24 23:36:34 2014 +0300

    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

commit 6e4fbafa554244c2561cf2cb07c5bda1d4e39210
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Jun 24 00:19:39 2014 +0300

    #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:`

commit 0b47342b2f9f5d7eaabf7a6874feb32604dd0f91
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jul 14 13:01:05 2014 +0300

    No need for explicit ivar and getters, as long as we have the @synthesize in place

commit 39db37808233dcdcd59a2ec63004a97015e9305b
Merge: 894a1b1 72a4e7b
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Jul 11 09:57:28 2014 +0300

    Merge pull request #783 from bpoplauschi/race_condition

    Replace #621Fixed race condition between operation cancelation and loading finish

commit 894a1b18108deb90d3479d163e61ef8621e87e01
Merge: 2e708d3 99590ed
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Thu Jul 10 10:57:51 2014 +0300

    Merge pull request #794 from vjyanand/master

    Update MKAnnotationView+WebCache.m

commit 99590ed6ec45835411ab1a9515d6091067c8a27d
Author: Vjy Anand <vjyanand@users.noreply.github.com>
Date:   Sun Jul 6 06:40:06 2014 -0400

    Update MKAnnotationView+WebCache.m

    Replace deprecated method call

commit 2e708d35188b2d90a8cddac4d131094df3bfbd9d
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Jul 4 10:56:09 2014 +0300

    Updated README.md with badges

commit 30e034d60d764dd39c21b66f60bd5894d5a0373b
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jun 30 00:07:32 2014 +0300

    Fixed misspell

commit 72a4e7b8301e05e01a54434b40255162a34116eb
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 25 23:35:08 2014 +0300

    Replace #621Fixed race condition between operation cancelation and loading finish

commit 30f672661cdef884b0f2dc5c141b0ba97a9ff0ea
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 26 00:27:56 2014 +0300

    Added option to use the cached image instead of the placeholder for UIImageView. Replaces #541. Fixes #599

commit a6f11b3ad77a54853b5198dcd3523b2153396883
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 25 21:32:53 2014 +0300

    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

commit 23874cdca4f1a250699e2f7609ab145b421ef861
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 25 11:24:59 2014 +0300

    Update for #771 - instead of removing the old methods, deprecated them so we are backwards compatible.

commit 6d01e80409b88babdfba344fe342de5e113dbeae
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 25 11:04:28 2014 +0300

    Added comments and coding style to previous pull request #771

commit 9b18145e56ef1aa63d4183701990e7a86737a476
Merge: 3a7adbb 5615cf1
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Jun 25 10:49:44 2014 +0300

    Merge pull request #771 from Whirlwind/new_cancel_logic

    Refactor the cancel logic

commit 3a7adbbacfb9ff827b4155d00ea4ae4fcec01ed6
Merge: 50c4d1d 8d668b4
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 24 18:29:09 2014 +0300

    Merge pull request #780 from rokgregoric/master

    Do not load placeholder image if SDWebImageDelayPlaceholder option specified.

commit 8d668b412180287332325bd5c6d3e743dc0e5e07
Author: Rok Gregorič <rok.gregoric@gmail.com>
Date:   Tue Jun 24 12:37:21 2014 +0200

    Do not load placeholder image if SDWebImageDelayPlaceholder option specified.

commit 50c4d1d2eb11e86f69a72021098e9738f008c009
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jun 23 21:57:33 2014 +0300

    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

commit c7330db3a6e54a95ca2f2c8319aabb882c99ff19
Merge: fe4b3a0 e5faad0
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jun 23 21:23:56 2014 +0300

    Merge branch 'unit_tests'

    Unit testing setup + created workspace
    - created a SDWebImage.xcworkspace
    - includes the existing SDWebImage.xcodeproj (responsible of compiling the library)
    - includes the existing SDWebImage Demo.xcodeproj
    - includes the newly created SDWebImage Tests.xcodeproj (tests project). The test project uses the local CocoaPods repo to link to the library

    Unit testing backbone:
    - XCTest framework (the one from Apple)
    - XCTestAsync - extension for XCTest that allows easily creating asynchronous tests. Relies on dispatch_after.
    - Expecta - matcher Framework for Objective-C/Cocoa

    Updated gitignore

commit e5faad0026ae56489c40def064530c19f7ae5f66
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 18:04:06 2014 +0300

    Reverted demo project referencing source files directly. Re-added SDWebImage project as subproject

commit e0b3de435715cca3e79c85a40f2d3b737118b307
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 17:51:40 2014 +0300

    Added error test

commit c1fae30d635998408ec083dba8a435ee2e96d926
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 17:21:01 2014 +0300

    Added SDWebImage Tests project. It uses CocoaPods (Expecta + XCTestAsync). Added some demo tests

commit 60b043755f3e1ab4b5261d5e1ec38b0b17d6f1ca
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 16:41:53 2014 +0300

    Created a SDWebImage workspace with the 2 existing projects, fixed the demo project so it directly references the source files. Shared a demo project scheme

commit 7855f891859446e2548249a0c6ea0c25c1092b9c
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 16:40:43 2014 +0300

    Prepared gitignore for CocoaPods and workspaces

commit fe4b3a088ac20506a70c65604958eee51c6847d2
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 20 10:07:12 2014 +0300

    Fixed warnings from demo project (started using the new methods, the ones with the sd_ prefix).

commit 5615cf12de45fd3b7428e53fef841083f92ef966
Merge: 4c18545 af3e4f8
Author: Whirlwind <whirlwindjames@foxmail.com>
Date:   Fri Jun 20 10:51:17 2014 +0800

    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

commit af3e4f87e4a26606e55ec605c19958e17edc0d65
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 23:24:08 2014 +0300

    Returning error in setImage completedBlock if the url was nil. Added `dispatch_main_async_safe` macro. Fixes #505

commit eb91fdd3b82bfce586c7d439224576dcc93e0a1c
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 23:05:14 2014 +0300

    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

commit a8a69ab9b64c4370b8d07eef54f8dbf2bbc5c15d
Merge: 136daba e116aa5
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Thu Jun 19 12:38:12 2014 -0700

    Merge pull request #770 from bpoplauschi/completion_with_url

    Pass imageURL in completedBlock

commit 136daba9df8ad46fb5bccb5dd8954e2fd2dc0fbe
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 22:19:22 2014 +0300

    Added proper handling for SDWebImageDownloaderLowPriority (aka NSOperationQueuePriorityLow). Fixes #713 #745

commit e116aa5ce03b9aee2033cec9264e5eb8702af8f8
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 21:58:20 2014 +0300

    Updated some older code to match the coding style

commit ea663b96028ba9e2ebd47a359962d62b7585cc21
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 21:54:25 2014 +0300

    As discussed with @rs, prefixed all the new methods to sd_set*

commit 4c18545dbcb3af2d55d06a624dd7a7406d019b37
Author: Whirlwind <whirlwindjames@foxmail.com>
Date:   Thu Jun 19 22:46:37 2014 +0800

    Refactor the cancel logic

commit 03a751430de30829964846742a17cb6e2d0c1963
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:27:08 2014 +0300

    Pass image URL in completion blocks - step 6:
    - deprecated block type `SDWebImageCompletedBlock `, replaced with `SDWebImageCompletedBlock ` that contains NSURL* param

commit 81b5e72a9cf872c71e8d9c516bd956bda33c5713
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:26:12 2014 +0300

    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

commit 21b230f28f07206dfe8e40b1e0e817c9d09813dc
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:13:39 2014 +0300

    Fixed misspell (downloand -> download)

commit 76b552e21e5f7c7bceee46ab336cb9c6ee57f3c7
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:12:58 2014 +0300

    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

commit c38409b813f9199b7065d38353c5570e96ad182c
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:04:07 2014 +0300

    Updated UIButton category documentation (forth param for the completion block) + alignaments

commit 673fca91131fd525c8c73c12f109d566bd5749e3
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 12:00:23 2014 +0300

    Documentation alignaments

commit 939f68d27e4966f92bec6bffac33ce9d5d7eb832
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 11:55:02 2014 +0300

    Updated MKAnnotation view category documentation (forth param for the completion block) + alignaments

commit 7108b4f404331566ed2056ab4baa30961d3be201
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 11:49:27 2014 +0300

    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

commit 654a9c98ea027a9f477598f943fbe37e3c31b4f6
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 11:32:28 2014 +0300

    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

commit 233ef65f989185e10c33a79f425a38f905427414
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 11:10:38 2014 +0300

    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

commit 99b7a090f8782e62a235dbbfd510a9bcbe867892
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 10:51:55 2014 +0300

    Missing new line

commit a8f5627052e70052a839c819fef6339a3784e1f5
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 10:36:13 2014 +0300

    Added doc description for the NSData category

commit dfceb49d2ba85c49d89686ab0f5457acc57ac6db
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 19 10:35:55 2014 +0300

    Reordered categories in project file

commit e4b9ef512b6de452604484e4eeccbe0aab7db5ef
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 18 18:46:50 2014 +0300

    Fixed a warning in the demo project

commit 455188355f92b9d229d093669c3effa318cc877f
Merge: 9dcd68d c76aba6
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Thu Jun 19 00:02:20 2014 +0300

    Merge pull request #764 from n13/master

    support for image orientation

commit 9dcd68d5eeb83410dec93cde43e525b900c8332e
Merge: e410494 f63a45a
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Jun 18 15:39:57 2014 +0300

    Merge pull request #751 from robertmryan/master

    Avoid premature completion of prefetcher if request fails

commit e4104942ee13e2ddc0a98fad79636d9061fc5e6e
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 18 15:28:13 2014 +0300

    Return nil from SDScaledImageForKey if the input image is nil. Replaces #750. Fixes #365

commit f6fdaeb6ae7b115bbc4b1b392305edf6d7f02edf
Merge: b81b7f9 364f5c4
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 17 21:57:54 2014 +0300

    Merge pull request #766 from Whirlwind/origin_master

    should not add url to failedURLs when timeout, cancel and so on. #707

commit 364f5c4d7a8e8289058dafe3b9e6fe9f7cee5566
Author: Whirlwind <whirlwindjames@foxmail.com>
Date:   Wed Jun 18 00:14:23 2014 +0800

    should not add url to failedURLs when timeout, cancel and so on. #707

commit b81b7f9b4af39c9b3e6533487d54e518ec7e2b6a
Merge: 6c409cd acac18d
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 17 19:08:28 2014 +0300

    Merge pull request #765 from Whirlwind/fix_highlight_error

    fix UIImageView+HighlightedWebCache call error method

commit 6c409cd8a00fce0e4d10b75f3098a70320850aee
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Tue Jun 17 18:54:04 2014 +0300

    Exposing the SDWebImageManager from the SDWebImagePrefetcher class. Fixes #394

commit c76aba6c00077fa6edca7f79477dde38dc736381
Author: Nikolaus Heger <nheger@gmail.com>
Date:   Tue Jun 17 22:38:37 2014 +0700

    support for image orientation

commit 2973aedd09703721e12e24152027647d684eed27
Merge: 0772019 ec5369d
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 17 17:04:34 2014 +0300

    Merge pull request #683 from brynbodayle/master

    Fixed issue where cancelled operations aren't removed from runningOperations.

commit 0772019e4d933998216d0aa5bed1c01824677205
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Mon Jun 16 18:21:06 2014 +0300

    SDWebImageManager uses the shared instance of SDWebImageDownloader. This was requested by several developers for easier setup of their downloads. Replaces #486

commit 22782052a1e38403ea47c57e32688e0ae457006e
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Jun 16 18:10:23 2014 +0300

    Updated README.md

commit 6759e5982e60ea1cacfb62c84da5771a955fd16d
Merge: d6a7e1a 0e7d3cd
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Jun 16 18:07:39 2014 +0300

    Merge pull request #376 from ivanoblomov/master

    Added alternate compiler flag for frameworks that extend optional libraries, like Parse and RestKit

commit d6a7e1a8c3e6e36637cf88c1ec02ea15798f08a1
Merge: 689586f f5d0ddc
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Mon Jun 16 17:59:22 2014 +0300

    Merge pull request #763 from dchohfi/master

    #761 fixing potential bug when sending a nil url for UIButton+WebCache

commit f5d0ddc2706f86561e726610823533de0a6ca45d
Author: Diego Chohfi <dchohfi@gmail.com>
Date:   Mon Jun 16 11:46:19 2014 -0300

    #761 fixing potential bug when sending a nil url for UIButton+WebCache

commit 689586f73a052b7bf2ac593816e692ac52bc5028
Merge: e6c0f56 c285074
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Jun 15 22:38:07 2014 +0300

    Merge pull request #687 from rokemoon/master

    Create NSOperation when start operation.

commit e6c0f56d1f001253fa70e10c226b7effb07e6bc6
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Sun Jun 15 22:23:48 2014 +0300

    Exposed cache paths - fixes #339

commit a0bc09df7d303e78cbbcc4a455b50174bd0aa19a
Merge: 5fd21e5 25d20ea
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Jun 15 18:29:23 2014 +0300

    Merge pull request #644 from kencoken/master

    Added method to SDWebImageManager to check if an image exists in either ...

commit 5fd21e5ce1a53cc59d013772eaed5753e6a27f05
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Sun Jun 15 18:08:32 2014 +0300

    Exposed SDWebImageManager cacheKeyForURL

commit 5b1451e11cd38373d63a65579e7e13a5ad29f08f
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Fri Jun 13 18:23:17 2014 +0300

    Since we use tag 3.6, the podspec file must match that. Fixes #757

commit b29850b61bc249e2e00439f53fb9ccf675e65b6f
Merge: 7abff88 78a50d3
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Jun 13 10:11:28 2014 +0300

    Merge pull request #714 from derpoliuk/master

    Saves image to cache without downloading it.

commit 7abff886ae9590e7cc1e3517c8be5fa532a5c4f7
Merge: f5bd783 1ac6b92
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Fri Jun 13 10:07:30 2014 +0300

    Merge pull request #560 from klaaspieter/imageURL-property

    Keep a reference to the image URL

commit 1ac6b92d9d68a560f80e3797e04edab1024caf08
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Tue Dec 3 16:41:00 2013 -0500

    Conform to coding style

commit b9389350cb6cc21e54b00ec73c38ae3c58b3c90c
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Fri Nov 29 11:56:47 2013 -0500

    Store image URLs by state in the UIButton category

commit 67ed774c0cdbbfda6f64e70112b27e1bcd435a01
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Fri Nov 29 11:48:03 2013 -0500

    Scratch that, this won't work on UIButton

commit 825207d1d099d08d0353c53d63adb8a280335c0e
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Fri Nov 29 11:43:02 2013 -0500

    Add imageURL property to remaining categories

commit 77be243598990976a4b78f5e9549bd9c29bf61f2
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Fri Nov 29 11:39:01 2013 -0500

    Add documentation to imageURL property

commit 074ce1f4cf4e5ad552fd62fcf958d60f15391515
Author: Klaas Pieter Annema <klaaspieter@annema.me>
Date:   Mon Nov 25 16:37:26 2013 -0500

    Keep a reference to the image URL

commit f5bd783b5ed0c9cb1d782ac89a72f910de6a9a5f
Merge: 3284e15 9a45faa
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Thu Jun 12 06:38:34 2014 -0700

    Merge pull request #701 from billburgess/delayplaceholder

    Delay the loading of the placeholder image until after load

commit 3284e157ffe961eabc747f5b891e20ad22568b04
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Thu Jun 12 14:58:32 2014 +0300

    Documented SDWebImageDownloaderOperation initWithRequest:options:progress:completed:cancelled: method. Fixes #526

commit fe48ee54f39d98c2cba41d6d0ca8c4fe48b93279
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 11 12:46:20 2014 +0300

    Added SDWebImageCompat.m to SDWebImage+MKAnnotation target

commit 5b59677437ee31e5db2804aed1d7db1567a6caf4
Author: Bogdan Poplauschi <bpoplauschi@gmail.com>
Date:   Wed Jun 11 11:52:06 2014 +0300

    Fixed #384 (documentation wrognly stated a return type was NSOperation)

commit 12ee2d114bf1ff48f9ab992e77834ccf6044252e
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed Jun 11 11:44:45 2014 +0300

    Updated README.md to fix #476

commit f63a45add6a4c365fdfad68ff2bef5c5bd5d15a7
Author: robertmryan <robert.ryan@mindspring.com>
Date:   Wed Jun 11 02:36:47 2014 -0400

    Adjusted completion logic in prefetcher, as the old implementation would finish prematurely if any requests were skipped.

    Also adjusted documentation in headers to make it clear that the `finishedCount` includes both successful and unsuccessful requests.

commit a46f6149e502862ef8b8b02a39a8df118dea3f3c
Author: robertmryan <robert.ryan@mindspring.com>
Date:   Wed Jun 11 02:14:40 2014 -0400

    Resolve race condition.

    While exceedingly unlikely, the old construct introduced potential race condition where it checked wself first, and assigned sself second. This now assigns sself first, and then checks that, which is the correct pattern, already used elsewhere in SDWebImage.

commit 257da39e4d528bda29d305e8a9f7e76e01d015c0
Merge: caf3299 2ca5eab
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 10 13:41:43 2014 +0300

    Merge pull request #732 from dchohfi/master

    #725 adding completition block when removing image from cache

commit caf3299c270b5792962f7fed80dafa8037a47f37
Merge: 3b32f1d f43dd89
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Tue Jun 10 13:38:28 2014 +0300

    Merge pull request #744 from Pei116/master

    fixed SDWebImageRefreshCached bug for large images

commit 3b32f1dd9df5c7eba813d7a955577ae9b2d578a0
Merge: 542d930 241dafd
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Sun Jun 8 19:00:31 2014 +0300

    Merge pull request #741 from martinblech/master

    Synthesize `executing` and `finished` properties.

commit f43dd896fa2cc6410ca02f94f928a9fb7f2b2ee3
Author: Edison Chang <edchang@Edisons-Mac.local>
Date:   Wed Jun 4 12:36:11 2014 +0800

    fixed SDWebImageRefreshCached bug for large images

commit 542d930f109d7de7e5d14ef1710f85ffa87e4ff8
Merge: a83f440 5f239c0
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Jun 3 14:26:08 2014 -0700

    Merge pull request #742 from openresearch/master

    Fix getter names. Fixes commit: 097b502eae

commit 5f239c07b8f488721abe3a025a72a8baa9854cce
Author: Philipp Schmid <schmidp@schmidp.com>
Date:   Tue Jun 3 22:42:15 2014 +0200

    Fix getter names. Fixes commit: 097b502eae

    The getters of the properties “executing” and
    “finished” both use custom getter names.

    097b502eae implemented the wrong getter names
    without the “is” prefix.

commit 241dafdd57eef9694f753be3fd50b46ee846ad87
Author: Martin Blech <martinblech@gmail.com>
Date:   Tue Jun 3 11:37:22 2014 -0300

    Synthesize `executing` and `finished` properties.

    It wouldn't build on Xcode 6 otherwise.

commit a83f44026946ba44525f7243bf1c73d5f22817f0
Merge: 4566b67 097b502
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Jun 2 15:04:53 2014 -0700

    Merge pull request #737 from openresearch/master

    Fix build on Xcode6

commit 097b502eae36fdb552580e100427ebe604b03973
Author: Philipp Schmid <schmidp@schmidp.com>
Date:   Mon Jun 2 23:59:57 2014 +0200

    Fix build on Xcode6

commit 4566b67f983bf1f5f2a21c8acb2348cea7ea4f8b
Merge: 5b3c54b db614bc
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Jun 2 10:10:16 2014 -0700

    Merge pull request #735 from nickhingston/pullRequestBranch

    If NSURLConnection response statusCode not valid (e.g. 404) , downloader...

commit db614bc53e17553a3720a1af3569a2145435c357
Author: Nick Hingston <nick@wearemothership.com>
Date:   Mon Jun 2 12:34:17 2014 +0100

    If NSURLConnection response statusCode not valid (e.g. 404) , downloader never stops its runloop and hangs the operation queue

commit 5b3c54ba163d2949b4712120e79882beb8ca2f54
Merge: 7edeef9 2c5ee72
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Jun 2 02:23:59 2014 -0700

    Merge pull request #734 from soundcloud/master

    add a suspension method to image downloaders

commit 2c5ee720ba44da43615de9c0f9ecf2634f6de213
Author: Richard Howell <richard@soundcloud.com>
Date:   Mon Jun 2 11:12:26 2014 +0200

    add a suspension method to image downloaders

commit 2ca5eab0e53f4cbbb0638281e7bdbc03c9d39d69
Author: Diego Chohfi <dchohfi@gmail.com>
Date:   Thu May 29 11:05:43 2014 -0300

    #725 adding completition block when removing image from cache, added an extra method so we don't break compatibility with older versions

commit 7edeef9f1a564d6157f8d501f8b8cdf09ec08b02
Author: Bogdan Poplauschi <bpoplauschi@users.noreply.github.com>
Date:   Wed May 28 09:46:40 2014 +0300

    Updated README.md with CocoaPods install

commit fca411224b9604fa6f80e8b77a7418c14f912cc0
Merge: 7764e47 dab65ae
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Sat May 24 10:38:16 2014 -0700

    Merge pull request #728 from kejinlu/master

    The ioQueue is "SERIAL" ,so "dispatch_barrier_async" is not needed.

commit dab65ae8f5883d0bef61a092bf89bf505df85f61
Author: 卢克 <luke.lkj@taobao.com>
Date:   Sat May 24 21:08:39 2014 +0800

    The ioQueue is "SERIAL" ,so "dispatch_barrier_async" is not needed.

commit 7764e47a36e7f1db785673c7ba7d58e6a606f53a
Merge: 1c50603 b1203d4
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri May 23 15:00:20 2014 -0700

    Merge pull request #727 from kejinlu/master

    It's generally a bad idea to remove items from a container while iterating through it.

commit b1203d4a9e4ba69e1b0da90e009517fa0734c67a
Author: 卢克 <luke.lkj@taobao.com>
Date:   Fri May 23 17:44:59 2014 +0800

    It's generally a bad idea to remove items from a container while iterating through it. And fix the thread safe issue.

commit acac18d6a271b709431358ccf485c3126a8bcdce
Author: Whirlwind <whirlwindjames@foxmail.com>
Date:   Thu May 22 22:55:21 2014 +0800

    fix UIImageView+HighlightedWebCache call error method

commit 1c5060369e2db2a72b218ba245ca615bc30e3569
Merge: 36d5069 29302f4
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed May 21 22:44:47 2014 -0700

    Merge pull request #721 from rivera-ernesto/improve_logging

    Improve logging and fix arm64 warnings when printing integers with %d

commit 36d5069b66714042de4fc9172305a396607d7372
Merge: 6f02d77 6c79daa
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed May 21 07:47:16 2014 -0700

    Merge pull request #720 from rivera-ernesto/update_projects

    Update projects to Xcode recommended settings

commit 29302f49b344c1a5b37b9b0925e5f452c7ce54cb
Author: 利辺羅エルネスト <rivera_ernesto@cyberagent.co.jp>
Date:   Wed May 21 17:15:01 2014 +0900

    Improve logging and fix arm64 warnings when printing integers with %d

commit 6c79daad001851da55b50a214913e4e14ad5078e
Author: 利辺羅エルネスト <rivera_ernesto@cyberagent.co.jp>
Date:   Wed May 21 17:10:25 2014 +0900

    Update projects to recommended settings

commit 6f02d77add2750dfb2fba5f7cb0d2842c8198098
Merge: 8fe7202 9867940
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue May 20 23:39:25 2014 -0700

    Merge pull request #646 from Whirlwind/master

    add category for imageView's highlighted state

commit c335e1f597d550cca37dbc4a96618b88981461c8
Author: Xiaoliang Chen <chenxiaoliang02@meituan.com>
Date:   Sun May 18 12:18:18 2014 +0800

    fix duplicate symbols when using with webp via pods

commit 78a50d39296b2e04cb9ca6c59ee9c694dcd2669c
Author: derpoliuk <derpoliuk@gmail.com>
Date:   Tue May 13 11:11:36 2014 +0300

    Adds -[SDWebImageManager saveImageToCache:forURL:] method

commit 9a45faac3f9169bd78fff9a63175eeec3c410657
Author: Bill Burgess <bill@simplymadeapps.com>
Date:   Tue Apr 29 10:27:54 2014 -0500

    Wrapped placeholder check in parens to work with bitwise

commit 7ca81d0e36612a7df27fcdace61aca157963cc83
Author: Bill Burgess <bill@simplymadeapps.com>
Date:   Tue Apr 29 10:13:28 2014 -0500

    Updated bitwise operator to correctly find option if more than 1 are included

commit f7ee9d337513fdb181543f9b7ad80e38f7fcb3ec
Author: Bill Burgess <bill@simplymadeapps.com>
Date:   Mon Apr 28 12:30:27 2014 -0500

    Moved the delay placeholder flag to SDWebImageOptions

commit 12715da31b591ae888c05f5307e6a8997af03e2d
Author: Bill Burgess <bill@simplymadeapps.com>
Date:   Mon Apr 28 10:07:43 2014 -0500

    Overload -setImageWithURL to delay setting of placeholder image until after loading

commit 8fe72023dc7f0c097aabb4397d5f8690ce8a6b0e
Merge: c9a24e2 83843a4
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Apr 28 12:31:04 2014 +0200

    Merge pull request #700 from herrernst/master

    Save image in cache before calling completion block

commit 83843a493a7b785d3c83eba82ecec3d527168df3
Author: herrernst <herr.ernst@gmail.com>
Date:   Sat Apr 26 12:43:25 2014 +0200

    Save image in cache before calling completion block

commit c9a24e294aa8bd464cd8d34962399a44b2469758
Merge: 88e6ca3 bdef765
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Apr 22 18:35:30 2014 +0200

    Merge pull request #698 from salling/master

    Fixing race in SDWebImageDownloaderOperation leading to erroneous timeout.

commit bdef7651f02e3e725a46b1d30045d0ebf96ef4a3
Author: Jonas Salling <jonas@salling.com>
Date:   Tue Apr 22 14:52:20 2014 +0200

    Update SDWebImageDownloaderOperation.m

    Fixing race condition that causes cancellation of one download operation to stop a run loop that is now used for another download operation. Race is introduced through -performSelector:onThread:withObject:waitUntilDone:

commit 88e6ca3e497c6d42f70a9d24261a428d54437923
Merge: db86161 1f202ed
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed Apr 16 20:22:13 2014 -0700

    Merge pull request #694 from shifu/master

    Port Max's crash fix to my 3.6 fork

commit 1f202ed7a39f2f203ae2f50bcae7561f22bbcd0b
Author: Chang Luo <changluo@yahoo-inc.com>
Date:   Wed Apr 16 16:06:22 2014 -0700

    Port Max's crash fix to my 3.6 fork

commit c28507432144cfe7673402bae62812bf8c501edf
Author: Ruslan Ahapkin <r.ahapkin@gmail.com>
Date:   Thu Apr 3 23:16:48 2014 +0400

    Create NSOperation when start operation.
    Method getDiskCount returns NSUInteger.

commit db86161132e6e7742a084879ec9f54467a1b5435
Merge: b49243d 065db6d
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Thu Apr 3 07:52:00 2014 -0700

    Merge pull request #685 from jeffleeismyhero/patch-1

    Updates progress callback to use NSInteger

commit 065db6db0c47668735d36ec7eedcf2e26b071b64
Author: Jeffrey Lee <jlee42@gmail.com>
Date:   Thu Apr 3 09:37:08 2014 -0500

    Updates progress callback to use NSInteger

    Pull Request #606 resolves this issue in the code but not in the Documentation.

commit ec5369db135b9f0a2f4ab3e70b583697dc95b1f1
Author: Bryn Bodayle <bryn.bodayle@gmail.com>
Date:   Tue Apr 1 10:21:11 2014 -0500

    Fixed issue where cancelled operations aren't removed from runningOperations

commit b49243d147b2abd5c1604c498c60aad5366dfb7b
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Mar 24 13:32:45 2014 -0700

    Bump version to 3.6.0

commit 710908ed917c500cfc89f5a9b52ead1453fdd114
Merge: 4b26a89 556665d
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Mar 24 13:27:54 2014 -0700

    Merge pull request #676 from matej/cache-gcd-fixes

    Various GCD related fixes for SDImageCache

commit 556665d8a79714d73eaffad864ecfccecbca2680
Author: Matej Bukovinski <matej@bukovinski.com>
Date:   Mon Mar 24 21:14:32 2014 +0100

    Exposed cleanDiskWithCompletionBlock:, added some additional documentation and fixed a typo.

commit 87aed007335603587d0c7d0fb09a9dc9235a67a1
Author: Matej Bukovinski <matej@bukovinski.com>
Date:   Mon Mar 24 21:14:21 2014 +0100

    Fixed the background task handled in backgroundCleanDisk.

     - the background task had no effect, since cleanDisk returns immediately and thereby cancels the background task
     - adding cleanDiskWithCompletionBlock: and modifying backgroundCleanDisk to use this method resolves the issue

commit 63f5c9706e244f40af1003edbc176ee53562a54d
Author: Matej Bukovinski <matej@bukovinski.com>
Date:   Mon Mar 24 20:48:06 2014 +0100

    Performing getSize and getDiskCount on the ioQueue.

commit 1c463ad46b3aac9213ad7de9a9acdd64bf580bce
Author: Matej Bukovinski <matej@bukovinski.com>
Date:   Mon Mar 24 20:35:52 2014 +0100

    Using the private fileManager instance when on the ioQueue.

commit dd682c92b59f556d548031dbaaf3ea0ea5a6f269
Author: Matej Bukovinski <matej@bukovinski.com>
Date:   Mon Mar 24 20:14:18 2014 +0100

    Performing cache callbacks from the ioQueue asynchronously.

    - more appropriate than dispatch_main_sync_safe, since we’ll always be on the ioQueue when calling
    - prevents deadlock situation described in #625

commit 4b26a89ac42337e0ed16dc7d727755b248800484
Merge: 71de51d 65163ea
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Mar 18 20:19:44 2014 -0700

    Merge pull request #671 from T-Pham/patch-1

    Typo in README.md

commit 65163ea1ac1e36691ac16acbeac0247dd8ae746c
Author: Phạm Minh Thành <Thanh.Pham@eastagile.com>
Date:   Wed Mar 19 10:14:57 2014 +0700

    Typo in README.md

commit 71de51d65874c36f23594bd76d05d24d620cb418
Merge: 938c2e0 efb0b35
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Sun Mar 16 00:26:53 2014 -0700

    Merge pull request #665 from taichino/fix_backgrounding_task

    Call endBackgroundTask at the end of start method

commit efb0b359bf2d09700c0fa20709355047837ad33e
Author: Matsumoto Taichi <taichino@gmail.com>
Date:   Sat Mar 15 07:56:09 2014 -0400

    SDWebImageDownloaderOperation: call endBackgroundTask after operation is finished so that beginBackgroundTaskWithExpirationHandler and endBackgroundTask are balanced

commit 938c2e0f3f90847b5da09bdfbc69c9f09c7bd094
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri Mar 14 23:56:40 2014 -0700

    Fix some indentation issues

commit a883c63e9c81efcaca60c2754f41c5122dd949b4
Merge: 4e4ecd6 8b315a3
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri Mar 14 23:49:01 2014 -0700

    Merge pull request #664 from xuki/master

    add support for high priority download

commit 8b315a35859a1abb0cc8ebd35d96a439dd030f5c
Author: jason <jason@jason>
Date:   Sat Mar 15 03:24:02 2014 +0800

    add support for high priority download

commit 4e4ecd6d028de22dd3b1c08130bbdf72f62abce4
Merge: 1293582 b9bb555
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Mar 10 00:02:17 2014 -0700

    Merge pull request #649 from finik/patch-1

    Add typedef for cache operation complete block

commit b9bb5558e4521ac63f5dd2b886a01382b1043b42
Author: Dmitry Fink <dmitry@finik.net>
Date:   Sun Mar 9 23:51:56 2014 -0700

    Add typedef for cache operation complete block

    Makes it cleaner when users want to define the block independantly

commit 129358204705b2695d5ef20ebb335cdbe375a381
Merge: 5f3e927 f2546c7
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Mar 3 20:58:05 2014 -0800

    Merge pull request #647 from musaicapp/bug

    Prefetcher: check progressBlock is not nil before executing.

commit f2546c733328b57d459ae6754f0bda99ef0012b8
Author: Michael Henderson <michael@josephmark.com.au>
Date:   Tue Mar 4 14:10:50 2014 +1000

    Check progressBlock is not nil before executing.

commit 986794012d39ed1844a5a11d5e9e810d0984c0a7
Author: Whirlwind <whirlwindjames@foxmail.com>
Date:   Mon Mar 3 12:32:27 2014 +0800

    add category for imageView's highlighted state

commit 25d20ead49f8992e001c262ee2c0d2ec0b1e3f4b
Author: Ken Chatfield <ken.chatfield@gmail.com>
Date:   Thu Feb 27 21:07:00 2014 +0000

    Added method to SDWebImageManager to check if an image exists in either the disk OR the memory cache

commit 5f3e9272c8061fcd056904aa9a32cb19d3121448
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Feb 24 09:43:14 2014 -0800

    Fix deployement target for arm64

commit e34e8e6c65c4402d3d26af234ee7691efdaa22bc
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Feb 24 09:38:08 2014 -0800

    Bump version to 3.5.4

commit 657bd816587b894aa83a72f9bc678ac26b6e421d
Merge: 1b394c1 1d8bfa6
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Feb 18 00:27:53 2014 -0800

    Merge pull request #638 from limbo-lab/master

    added clearDiskOnCompletion

commit 1d8bfa6064fe05f2435c5d7b2593f566c11be7c6
Author: limbo-lab <xian.tuxoid@qq.com>
Date:   Tue Feb 18 15:30:14 2014 +0800

    added clearDiskOnCompletion

commit 1b394c14b6389ed2ff529ea93a9fb69dfe7be5cd
Merge: 65acbec f717d50
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Sat Feb 15 13:20:56 2014 -0800

    Merge pull request #637 from runmad/master

    Missing method definition in header file

commit f717d507a5bca54bad37e01a780706ddd3942c85
Author: Rune Madsen <runemadsen@mac.com>
Date:   Sat Feb 15 15:46:10 2014 -0500

    Missing method definition in header file

commit 65acbec16d39a6252975de2c03e4ee895a079347
Merge: 2ad8d81 c04e4ef
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri Feb 14 02:05:36 2014 -0800

    Merge pull request #635 from burakkilic/patch-1

    Update SDWebImagePrefetecher.m

commit c04e4efbf128f34f3f0f98279beda1b3928136e0
Author: burakkilic <burakkilic@gmail.com>
Date:   Fri Feb 14 11:56:09 2014 +0200

    Update SDWebImagePrefetecher.m

    I added "+ self.skippedCount" because it never completes if there are skipped operations.

commit 2ad8d81768f2b8bf18d02b20e37145464d0f5cf1
Merge: 895249b 159f082
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Fri Feb 14 01:46:19 2014 -0800

    Merge pull request #634 from burakkilic/patch-1

    Update SDWebImagePrefetecher.m

commit 159f08279af01deb77233545f29e5c29adafce77
Author: burakkilic <burakkilic@gmail.com>
Date:   Fri Feb 14 11:38:20 2014 +0200

    Update SDWebImagePrefetecher.m

    I added progress block that I need.

commit 895249b3125ac42bcffb1343588f70238cdb3cf6
Merge: 10ff189 c13ec87
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed Feb 12 16:02:01 2014 -0800

    Merge pull request #633 from hlian/progressive-orientation

    SDWebImageDownloaderOperation: pass orientation to initWithCGImage during progressive rendering

commit c13ec87b152033f38c19755203e2cac1d725871d
Author: Hao Lian <me@haolian.org>
Date:   Tue Feb 11 18:03:06 2014 -0500

    SDWebImageDownloaderOperation: pass orientation to initWithCGImage during progressive rendering

commit 10ff1892b43b5a7cbd69ad5727b062c0a461a802
Merge: 4589e4a edc1d88
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Tue Jan 21 10:57:19 2014 -0800

    Merge pull request #624 from akhenakh/620_move_categories

    refs #620 move NSData+ImageContenttype to the SDWebImage subdirectory

commit edc1d882e8920e2a0ffd8ca4c597b8173b0f3484
Author: Fabrice Aneche <akh@nobugware.com>
Date:   Tue Jan 21 09:57:50 2014 -0800

    refs #620 move NSData+ImageContenttype to the SDWebImage subdirectory

commit 4589e4a7447bdcf1e8a2bcbe78f78a9bae7527f3
Merge: 42f9736 8b16de2
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Wed Jan 15 12:42:36 2014 -0800

    Merge pull request #616 from akhenakh/fix_demo

    fix demo

commit 8b16de257576b991c77cfaa471c5dbd527d42b7c
Author: Fabrice Aneche <akh@nobugware.com>
Date:   Wed Jan 15 10:25:14 2014 -0800

    fix demo

commit 42f97369726f1ee282b40b63616e339adfcb2c8a
Merge: c00c2e0 03eeb58
Author: Olivier Poitrey <rs@dailymotion.com>
Date:   Mon Jan 6 18:39:38 2014 -0800

    Merge pull request #607 from akhenakh/reformat_code

    Code standardization

commit 03eeb5842f08514bf5ce50cea501f39fcde6c857
Author: Fabrice Aneche <akh@nobugware.com>
Date:   Mon Jan 6 17:37:52 2014 -0800

    reformat a long method call

commit bdea43aec17ec4f61002cfc0008a66b5c2eedddc
Author: Fabrice Aneche <akh@nobugware.com>
Date:   Mon Jan 6 17:30:28 2014 -0800

    Dot-notation should always be used for accessing and mutating properties. Bracket notation is preferred in all other instances

commit 6d8133557c5eb63017420e5b04678e788d8e1d3c
Author: Fabrice Aneche <akh@nobugware.com>
Date:   Mon Jan 6 17:13:30 2014 -0800

   …
c80d8ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2014
  1. @akhenakh

    explicit webp detection

    akhenakh committed
  2. @akhenakh

    fixed code format

    akhenakh committed
  3. @akhenakh

    reformat code

    akhenakh committed
View
10 NSData+ImageContentType.h
@@ -0,0 +1,10 @@
+//
+// Created by Fabrice Aneche on 06/01/14.
+// Copyright (c) 2014 Dailymotion. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSData (ImageContentType)
++ (NSString *)contentTypeForImageData:(NSData *)data;
+@end
View
44 NSData+ImageContentType.m
@@ -0,0 +1,44 @@
+//
+// Created by Fabrice Aneche on 06/01/14.
+// Copyright (c) 2014 Dailymotion. All rights reserved.
+//
+
+#import "NSData+ImageContentType.h"
+
+
+@implementation NSData (ImageContentType)
+
++ (NSString *)contentTypeForImageData:(NSData *)data
+{
+ uint8_t c;
+ [data getBytes:&c length:1];
+ switch (c)
+ {
+ case 0xFF:
+ return @"image/jpeg";
+ case 0x89:
+ return @"image/png";
+ case 0x47:
+ return @"image/gif";
+ case 0x49:
+ case 0x4D:
+ return @"image/tiff";
+ case 0x52:
+ // R as RIFF for WEBP
+ if ([data length] < 12)
+ {
+ return nil;
+ }
+
+ NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
+ if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"])
+ {
+ return @"image/webp";
+ }
+
+ return nil;
+ }
+ return nil;
+}
+
+@end
View
32 SDWebImage.xcodeproj/project.pbxproj
@@ -22,6 +22,12 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 1797E364CA5D259B8CEDF8EE /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1797E851007E466318B38B47 /* NSData+ImageContentType.h */; };
+ 1797E37E262405DB1BFEDFFC /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 1797E3D4E27D504ACD827BE1 /* NSData+ImageContentType.m */; };
+ 1797E59FBF11E6588BC89B66 /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1797E851007E466318B38B47 /* NSData+ImageContentType.h */; };
+ 1797E75161F3C9E8494E43E6 /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1797E851007E466318B38B47 /* NSData+ImageContentType.h */; };
+ 1797EBFB62F22E5C0A26A75D /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 1797E3D4E27D504ACD827BE1 /* NSData+ImageContentType.m */; };
+ 1797ED4CD80EA8BD405365C3 /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 1797E3D4E27D504ACD827BE1 /* NSData+ImageContentType.m */; };
530E49E816464C25002868E7 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
530E49E916464C26002868E7 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
530E49EA16464C7C002868E7 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -77,7 +83,6 @@
537D957C17ECC1FE0097C263 /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 530E49E416460AE2002868E7 /* SDWebImageDownloaderOperation.m */; };
537D957D17ECC1FE0097C263 /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 5340674F167780C40042B59E /* SDWebImageCompat.m */; };
537D957E17ECC1FE0097C263 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CC6172DC28500419892 /* UIImage+GIF.m */; };
- 537D957F17ECC1FE0097C263 /* NSData+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CCC172DC33A00419892 /* NSData+GIF.m */; };
537D958017ECC1FE0097C263 /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB8917623F7C00698166 /* UIImage+MultiFormat.m */; };
537D958117ECC1FE0097C263 /* UIImage+WebP.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB921762547C00698166 /* UIImage+WebP.m */; };
537D958217ECC1FE0097C263 /* webp.c in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFC9117625BE300698166 /* webp.c */; };
@@ -119,7 +124,6 @@
537D95A817ECC1FE0097C263 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
537D95A917ECC1FE0097C263 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
537D95AA17ECC1FE0097C263 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CC5172DC28500419892 /* UIImage+GIF.h */; };
- 537D95AB17ECC1FE0097C263 /* NSData+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CCB172DC33A00419892 /* NSData+GIF.h */; };
537D95AC17ECC1FE0097C263 /* UIImage+MultiFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB8817623F7C00698166 /* UIImage+MultiFormat.h */; };
537D95AD17ECC1FE0097C263 /* UIImage+WebP.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB911762547C00698166 /* UIImage+WebP.h */; };
537D95AE17ECC1FE0097C263 /* webpi.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFC9017625BE300698166 /* webpi.h */; };
@@ -187,10 +191,6 @@
A18A6CC8172DC28500419892 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CC5172DC28500419892 /* UIImage+GIF.h */; };
A18A6CC9172DC28500419892 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CC6172DC28500419892 /* UIImage+GIF.m */; };
A18A6CCA172DC28500419892 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CC6172DC28500419892 /* UIImage+GIF.m */; };
- A18A6CCD172DC33A00419892 /* NSData+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CCB172DC33A00419892 /* NSData+GIF.h */; };
- A18A6CCE172DC33A00419892 /* NSData+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CCB172DC33A00419892 /* NSData+GIF.h */; };
- A18A6CCF172DC33A00419892 /* NSData+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CCC172DC33A00419892 /* NSData+GIF.m */; };
- A18A6CD0172DC33A00419892 /* NSData+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CCC172DC33A00419892 /* NSData+GIF.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -204,6 +204,8 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 1797E3D4E27D504ACD827BE1 /* NSData+ImageContentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+ImageContentType.m"; sourceTree = SOURCE_ROOT; };
+ 1797E851007E466318B38B47 /* NSData+ImageContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+ImageContentType.h"; sourceTree = SOURCE_ROOT; };
530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageDownloaderOperation.h; sourceTree = "<group>"; };
530E49E416460AE2002868E7 /* SDWebImageDownloaderOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageDownloaderOperation.m; sourceTree = "<group>"; };
530E49E71646388E002868E7 /* SDWebImageOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageOperation.h; sourceTree = "<group>"; };
@@ -277,8 +279,6 @@
53FB894814D35E9E0020B787 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
A18A6CC5172DC28500419892 /* UIImage+GIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+GIF.h"; sourceTree = "<group>"; };
A18A6CC6172DC28500419892 /* UIImage+GIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+GIF.m"; sourceTree = "<group>"; };
- A18A6CCB172DC33A00419892 /* NSData+GIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+GIF.h"; sourceTree = "<group>"; };
- A18A6CCC172DC33A00419892 /* NSData+GIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+GIF.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -365,8 +365,6 @@
children = (
53EDFB8817623F7C00698166 /* UIImage+MultiFormat.h */,
53EDFB8917623F7C00698166 /* UIImage+MultiFormat.m */,
- A18A6CCB172DC33A00419892 /* NSData+GIF.h */,
- A18A6CCC172DC33A00419892 /* NSData+GIF.m */,
A18A6CC5172DC28500419892 /* UIImage+GIF.h */,
A18A6CC6172DC28500419892 /* UIImage+GIF.m */,
53EDFB911762547C00698166 /* UIImage+WebP.h */,
@@ -377,6 +375,8 @@
53922D94148C56230056699D /* UIButton+WebCache.m */,
53922D95148C56230056699D /* UIImageView+WebCache.h */,
53922D96148C56230056699D /* UIImageView+WebCache.m */,
+ 1797E851007E466318B38B47 /* NSData+ImageContentType.h */,
+ 1797E3D4E27D504ACD827BE1 /* NSData+ImageContentType.m */,
);
name = Categories;
sourceTree = "<group>";
@@ -504,7 +504,6 @@
530E49E916464C26002868E7 /* SDWebImageOperation.h in Headers */,
530E49EB16464C7F002868E7 /* SDWebImageDownloaderOperation.h in Headers */,
A18A6CC8172DC28500419892 /* UIImage+GIF.h in Headers */,
- A18A6CCE172DC33A00419892 /* NSData+GIF.h in Headers */,
53EDFB8B17623F7C00698166 /* UIImage+MultiFormat.h in Headers */,
53E481E017C300F6003E8957 /* alpha_processing.h in Headers */,
53EDFB941762547D00698166 /* UIImage+WebP.h in Headers */,
@@ -522,6 +521,7 @@
53EDFCF617625F4100698166 /* utils.h in Headers */,
53EDFCFC17625F5F00698166 /* filters.h in Headers */,
53EDFD0217625F7900698166 /* thread.h in Headers */,
+ 1797E75161F3C9E8494E43E6 /* NSData+ImageContentType.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -540,8 +540,8 @@
530E49E816464C25002868E7 /* SDWebImageOperation.h in Headers */,
530E49EA16464C7C002868E7 /* SDWebImageDownloaderOperation.h in Headers */,
A18A6CC7172DC28500419892 /* UIImage+GIF.h in Headers */,
- A18A6CCD172DC33A00419892 /* NSData+GIF.h in Headers */,
53EDFB8A17623F7C00698166 /* UIImage+MultiFormat.h in Headers */,
+ 1797E59FBF11E6588BC89B66 /* NSData+ImageContentType.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -560,7 +560,6 @@
537D95A817ECC1FE0097C263 /* SDWebImageOperation.h in Headers */,
537D95A917ECC1FE0097C263 /* SDWebImageDownloaderOperation.h in Headers */,
537D95AA17ECC1FE0097C263 /* UIImage+GIF.h in Headers */,
- 537D95AB17ECC1FE0097C263 /* NSData+GIF.h in Headers */,
537D95AC17ECC1FE0097C263 /* UIImage+MultiFormat.h in Headers */,
537D95AD17ECC1FE0097C263 /* UIImage+WebP.h in Headers */,
537D95AE17ECC1FE0097C263 /* webpi.h in Headers */,
@@ -578,6 +577,7 @@
537D95BA17ECC1FE0097C263 /* utils.h in Headers */,
537D95BB17ECC1FE0097C263 /* filters.h in Headers */,
537D95BC17ECC1FE0097C263 /* thread.h in Headers */,
+ 1797E364CA5D259B8CEDF8EE /* NSData+ImageContentType.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -726,7 +726,6 @@
531041CB157EAFA400BBABC3 /* MKAnnotationView+WebCache.m in Sources */,
530E49ED16464C84002868E7 /* SDWebImageDownloaderOperation.m in Sources */,
A18A6CCA172DC28500419892 /* UIImage+GIF.m in Sources */,
- A18A6CD0172DC33A00419892 /* NSData+GIF.m in Sources */,
53EDFB8D17623F7C00698166 /* UIImage+MultiFormat.m in Sources */,
53EDFB961762547D00698166 /* UIImage+WebP.m in Sources */,
53EDFC9517625BE300698166 /* webp.c in Sources */,
@@ -754,6 +753,7 @@
53EDFCF817625F4100698166 /* utils.c in Sources */,
53EDFCFE17625F5F00698166 /* filters.c in Sources */,
53EDFD0417625F7900698166 /* thread.c in Sources */,
+ 1797EBFB62F22E5C0A26A75D /* NSData+ImageContentType.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -771,8 +771,8 @@
530E49EC16464C84002868E7 /* SDWebImageDownloaderOperation.m in Sources */,
53406750167780C40042B59E /* SDWebImageCompat.m in Sources */,
A18A6CC9172DC28500419892 /* UIImage+GIF.m in Sources */,
- A18A6CCF172DC33A00419892 /* NSData+GIF.m in Sources */,
53EDFB8C17623F7C00698166 /* UIImage+MultiFormat.m in Sources */,
+ 1797E37E262405DB1BFEDFFC /* NSData+ImageContentType.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -790,7 +790,6 @@
537D957C17ECC1FE0097C263 /* SDWebImageDownloaderOperation.m in Sources */,
537D957D17ECC1FE0097C263 /* SDWebImageCompat.m in Sources */,
537D957E17ECC1FE0097C263 /* UIImage+GIF.m in Sources */,
- 537D957F17ECC1FE0097C263 /* NSData+GIF.m in Sources */,
537D958017ECC1FE0097C263 /* UIImage+MultiFormat.m in Sources */,
537D958117ECC1FE0097C263 /* UIImage+WebP.m in Sources */,
537D958217ECC1FE0097C263 /* webp.c in Sources */,
@@ -818,6 +817,7 @@
537D959817ECC1FE0097C263 /* utils.c in Sources */,
537D959917ECC1FE0097C263 /* filters.c in Sources */,
537D959A17ECC1FE0097C263 /* thread.c in Sources */,
+ 1797ED4CD80EA8BD405365C3 /* NSData+ImageContentType.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
15 SDWebImage/NSData+GIF.h
@@ -1,15 +0,0 @@
-//
-// NSData+GIF.h
-// SDWebImage
-//
-// Created by Andy LaVoy on 4/28/13.
-// Copyright (c) 2013 Dailymotion. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface NSData (GIF)
-
-- (BOOL)sd_isGIF;
-
-@end
View
32 SDWebImage/NSData+GIF.m
@@ -1,32 +0,0 @@
-//
-// NSData+GIF.m
-// SDWebImage
-//
-// Created by Andy LaVoy on 4/28/13.
-// Copyright (c) 2013 Dailymotion. All rights reserved.
-//
-
-#import "NSData+GIF.h"
-
-@implementation NSData (GIF)
-
-- (BOOL)sd_isGIF
-{
- BOOL isGIF = NO;
-
- uint8_t c;
- [self getBytes:&c length:1];
-
- switch (c)
- {
- case 0x47: // probably a GIF
- isGIF = YES;
- break;
- default:
- break;
- }
-
- return isGIF;
-}
-
-@end
View
1 SDWebImage/UIImage+GIF.h
@@ -6,7 +6,6 @@
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
-#import "NSData+GIF.h"
#import <UIKit/UIKit.h>
@interface UIImage (GIF)
View
19 SDWebImage/UIImage+MultiFormat.m
@@ -8,7 +8,7 @@
#import "UIImage+MultiFormat.h"
#import "UIImage+GIF.h"
-
+#import "NSData+ImageContentType.h"
#ifdef SD_WEBP
#import "UIImage+WebP.h"
#endif
@@ -18,22 +18,23 @@ @implementation UIImage (MultiFormat)
+ (UIImage *)sd_imageWithData:(NSData *)data
{
UIImage *image;
-
- if ([data sd_isGIF])
+ NSString *imageContentType = [NSData contentTypeForImageData:data];
+ if ([imageContentType isEqualToString:@"image/gif"])
{
image = [UIImage sd_animatedGIFWithData:data];
}
- else
- {
- image = [[UIImage alloc] initWithData:data];
- }
-
#ifdef SD_WEBP
- if (!image) // TODO: detect webp signature
+ else if ([imageContentType isEqualToString:@"image/webp"])
{
image = [UIImage sd_imageWithWebPData:data];
}
#endif
+ else
+ {
+ image = [[UIImage alloc] initWithData:data];
+ }
+
+
return image;
}
Something went wrong with that request. Please try again.