Asynchronous image downloader with cache support as a UIImageView category
MIT License
Bot releases are visible (Hide)
Published by bpoplauschi almost 7 years ago
See all tickets marked for the 4.2.0 release
UIImage+GIF
category for animated GIF! Not enabled by default. #2064SDWebImageGIFCoder
on macOS
(use NSImage
API) #2067-[NSImage isGIF]
method to return whether current NSImage
has GIF representation #2071SDImageCache
disk cache #2057UIImage(GIF) sd_animatedGIFWithData
crash #1991 #1837SDWebImageManager.m __destroy_helper_block_
crash #2048 #1941FLAnimatedImage
instance on global queue #2047Published by bpoplauschi about 7 years ago
See all tickets marked for the 4.1.2 release
SDWebImageDownloaderOperation
not call done
when use SDWebImageDownloaderIgnoreCachedResponse
#2049WebP
decoding little enhancement. Do not need create WebP
iterator for static images #2050finished
check from equal
to equal or greater than
to protect accident condition #2051Published by bpoplauschi about 7 years ago
See all tickets marked for the 4.1.1 release
[SDWebImageDownloaderOperation reset]_block_invoke
2f892f9 fixes #1883SDWebImageDownloadOperation
imageData
multi-thread issue #2011 fixes #1998 [SDWebImageDownloaderOperation URLSession:dataTask:didReceiveData:]
crashCFRelease
on NULL
if CGImageSourceRef
create failed #1978 fixes #1968 #1834 #1947CGBitmapContextCreate
bitmap memory leak #1976 replaces #1860 fixes #1974sd_currentBackgroundImageURL
and sd_backgroundImageURLForState:
for UIButton
#2002UIButton
placeholer-image even if the url is nil
#2043 fixes #1721 #1964 replaces #1790CGImageSourceCreateIncremental
to perform progressive decoding instead of decode partial data each time from the beginning to improve performance and remove that gray background #2040 fixes #1899macOS
#1984WebP
and animated WebP
decoding #1985 fixes #1999 #1885FOUNDATION_EXPORT
over extern
#1977SDTestCase
#1980CLANG_WARN_STRICT_PROTOTYPES
#1995 #2027 fixes #2022macOS Demo
deployment target to 10.10
to support build on Xcode 9
#2035Published by bpoplauschi about 7 years ago
See all tickets marked for the 4.1.0 release
NSURLSessionConfiguration
used by SDWebImageDownloader
#1891 fixes #1870macOS
#1975NSURLErrorNetworkConnectionLost
#1767CFBundleVersion
and CFBundleShortVersionString
not valid for all platforms #1784 + 23a8be8 fixes #1780UIActivityIndicator
not always initialized on main thread #1802 + a6af214 fixes #1801SDImageCacheConfig
forward declaration changed to import #1805@autoreleasepool
to SDImageCache.storeImage
#1849long long
type transfer to NSInteger may become negative #1879self.URLOperations
dictionary #1911 fixes #1909 #1950 #1835 #1838self
which appears to create a dangled pointer #1940 fixes #1807 #1858 #1859 #1821 #1925 #1883 #1816 #1716Published by bpoplauschi over 7 years ago
See all tickets marked for the 4.0.0 release
Versions 4.0.0-beta and 4.0.0-beta 2 list all the changes.
Published by bpoplauschi about 8 years ago
See all tickets marked for the 4.0.0 release
SDWebImageScaleDownLargeImages
or SDWebImageDownloaderScaleDownLargeImages
Published by bpoplauschi about 8 years ago
See all tickets marked for the 4.0.0 release
SDWebImage xcodeproj
contains the following targets:
SDWebImage iOS static
(iOS static lib)SDWebImage watchOS static
(watchOS static lib)SDWebImage OSX
(OSX dynamic framework)SDWebImage iOS
(iOS dynamic framework)SDWebImage tvOS
(tvOS dynamic framework)SDWebImage watchOS
(watchOS dynamic framework)SDWebImage Demo xcodeproj
contains the following targets:
SDWebImage OSX Demo
SDWebImage iOS Demo
SDWebImage TV Demo
SDWebImage Watch Demo
libwep
version to 0.5.1
SDWebImageManager
downloadImageWithURL:options:progress:completed:
to loadImageWithURL:options:progress:completed:
as it makes more sense, since we check the cache first and download only if needed a32a177SDWebImage+MKAnnotation
, SDWebImage+WebP
, SDWebImageFramework
:
SDWebImage
target that build as a static library (all subspecs included) -> libSDWebImage.a
SDWebImageiOS
and SDWebImagetvOS
targets that build as dynamic frameworksWebImage
to SDWebImage
. Renamed the WebImage.h
to SDWebImage.h
to match the framework namingSDWebImageDownloader
method - downloadImageWithURL:options:progress:completed:
now returns a SDWebImageDownloadToken *
instead of id <SDWebImageOperation>
(give the ability to cancel downloads using the returned token)SDWebImageDownloaderOperation
initializer - initWithRequest:options:progress:completed:cancelled
split into - initWithRequest:options
and addHandlersForProgress:completed:
. Note: there is no more cancel blockinstancetype
instead of id
SDImageCache
)SDWebImageQueryCompletedBlock
with SDCacheQueryCompletedBlock
and added an NSData *
paramdone
param of SDImageCache
queryDiskCacheForKey:done:
is now a SDCacheQueryCompletedBlock
and those blocks must now include an NSData *
paramSDWebImageCompletionWithFinishedBlock
with SDInternalCompletionBlock
and added an NSData *
paramcompleted
param of SDWebImageManager
loadImageWithURL:options:progress:completed:
is now SDInternalCompletionBlock
and those blocks must now include an NSData *
paramSDWebImageCompletionBlock
to SDExternalCompletionBlock
UIImage
will no longer respond to sd_animatedGIFNamed:
or sd_animatedImageByScalingAndCroppingToSize:
SDWebImage
iOS static lib target to SDWebImage iOS static
for clarityNSData
ImageContentType
category, instead of returning the contentType as a string, the new added method sd_imageFormatForImageData
will return a SDImageFormat
enum valueSDImageCache
configuration properties moved into SDImageCacheConfiguration
(which is now available via config
property):
shouldDecompressImages
shouldDisableiCloud
shouldCacheImagesInMemory
maxCacheAge
maxCacheSize
storeImage:
methods from SDImageCache
were async already, but declared as sync. Properly marked them as async + added completion. Got rid of the recalculate param. If the NSData
is provided, use it. Otherwise, recalculate from the UIImage
diskImageExistsForURL:
and cachedImageExistsForURL:
from SDWebImageManager
diskImageExistsWithKey:
from SDImageCache
cleanDisk
and clearDisk
on SDImageCache
. Renamed cleanDisk
to deleteOldFiles
. No longer expose the sync clearDisk
and deleteOldFiles
, just the async ones.SDImageCache
queryDiskCacheForKey:done:
to queryCacheOperationForKey:done:
SDImageCache
clarification: imageFromDiskCacheForKey:
used to also check the memory cache which I think is misleading. Now imageFromDiskCacheForKey
only checks the disk cache and the new method imageFromCacheForKey
checks both cachesremoveImageForKey:
and removeImageForKey:fromDisk:
from SDImageCache
that looked sync but were async. Left only the 2 async onesUIImageView
sd_cancelCurrentHighlightedImageLoad
sd_
prefix to the activity indicator related methods (setShowActivityIndicatorView:
, setIndicatorStyle:
, showActivityIndicatorView
, addActivityIndicator
, removeActivityIndicator
) #1640dispatch_main_async_safe
for all the completion blocks on the main queue (used to be dispatch_sync
) - avoiding locks.dispatch_main_sync_safe
as it can be mistakenly usedurl
as param to progress block SDWebImageDownloaderProgressBlock
- #984WebCache
category on top of FLAnimatedImageView
TARGET_OS_*
macros. Added SD_MAC
, SD_UIKIT
, SD_IOS
, SD_TV
, SD_WATCH
. The biggest issue here was TARGET_OS_MAC
was 1 for all platforms and we couldn't rely on it.SDWebImageManager
- added a new initializer (initWithCache:downloader:
) 9112170UIImage
responds to sd_imageData
and sd_imageDataAsFormat:
via the MultiFormat
category. Those methods transform a UIImage
to the NSData
representation 82d1f2eSDWebImageDownloaderOperationInterface
to describe the behavior of a downloader operation. Any custom operation must conform to this protocol df3b6a5WebCache
categories into a UIView
WebCache
category. All the other categories will make calls to this one. Customization of setting the image is done via the setImageBlock
and the operationKey
e1840c3UIButton
, MKAnnotationView
, UIImageView
instancetype
and not a fixed type - c57cf7eNSURLSessionConfiguration
for SDWebImageDownloader
#1654url
as param to progress block SDWebImageDownloaderProgressBlock
- #984SDWebImageDownloaderOperation
: cancelInternal
was not called because of the old mechanism rellying on the thread
property - probably because that thread did not have a runloop. Removed that and now cancelInternal is called as expected f4bdae6setObjectForKey: object cannot be nil
) - #1676 7940577Carthage bitcode issue
) - #1593Add support for downloading images behind redirect
)dispatch_main_async_safe
macro in order to avoid redefinition when included as PodprogressBlock
(background queue)FLAnimatedImageView+WebCache
- #1687Published by bpoplauschi about 8 years ago
[NSURLCache cachedResponseForRequest:]
- the fix is actually avoiding to access NSURLCache
which appears to generate a race condition. We only call it if necesarry (SDWebImageRefreshCached
is used and the image cannot be cached by the system when it's too big or behind authentication)Published by bpoplauschi over 8 years ago
SDWebImageManager
cacheKeyFilter
block and do their own calculations there.Published by bpoplauschi over 8 years ago
NSURLConnection
with NSURLSession
#1578 #1586 - fixes #1291 #1318 #823 #1566 #1515SDWebImageManager
86fc47bf7b - fixes #1398 #870removeImageForKey:
not synchronous e6e5c51 - fixes #1379 #1415Published by bpoplauschi over 8 years ago
https://chromium.googlesource.com/webm/libwebp
to https://github.com/webmproject/libwebp
)cancelAllDownloads
method to SDWebImageDownloader
#1504NSData
to disk cache: [SDImageCache storeImageDataToDisk:forKey:]
#1453sd_setImageWithPreviousCachedImageWithURL:andPlaceholderImage:options:progress:completed:
and deprecated it. Will remove it in 4.0.0 b40124cCGContextDrawImage: invalid context 0x0
- #1496 (fixes #1401 #1454 #1457)CGBitmapContextCreateImage: invalid context 0x0
- #1464 (fixes #1423)#if TARGET_OS_IPHONE
to #if TARGET_OS_IOS
)MKAnnotationView+WebCache
#1547Published by bpoplauschi over 8 years ago
dispatch_apply
Published by bpoplauschi almost 9 years ago
libwep
version to 0.4.4
CGBitmapContextCreate: unsupported parameter combination
+ #1268 #1412 #1340dispatch_async
SDWebImagePrefetcher
- replaces #956dispatch_apply
sd_cancelBackgroundImageLoadForState
SDWebImageAvoidAutoSetImage
option to UIButton
and highlighted UIImageView
categoriessd_animatedImageByScalingAndCroppingToSize
Published by bpoplauschi over 9 years ago
NSMutableSet
for failed URLs' storage instead of array #1076Collection <__NSArrayM: > was mutated while being enumerated
#985SDWebImageAvoidAutoSetImage
option to avoid automatic image addition in UIImageView
and let developer to do it himself #1188SDWebImagePrefetcher
progressBlock
when it has completed #1017<Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil
if imageData
is nil 88ee3c6 #1018diskCachePath
#1041__typeof(self)
when assigning weak
reference for block #1054NSCache
countLimit property #1140failedURLs
can be removed at the appropriate time #1111NSCache
on system memory notifications #1143UIApplication
is available as per #1082 #1085WebP
enabled #1178ImageIO: CGImageSourceCreateWithData
data parameter is nil #1167WebImage.h
#1199Published by bpoplauschi over 9 years ago
libwep
version to 0.4.3
SDWebImageDownloaderAllowInvalidSSLCertificates
option - #937SDWebImageTransformAnimatedImage
) - #703SDWebImageDownloaderOperation
- #876cancelAll
crash - #838SD_LOG_NONE
that allows silencing the SD logs from the PrefetchersetImageWithURL:
- #896NSNotificationCenter
dispatch on subthreads - #987SDWebImageDownloader
threading issue - #1046failedURLs
- #994maxConcurrentOperationCount
, fixes #527 - #897NSArray
- #929SDWebImageDownloaderOperation connection:didFailWithError:
should match the code from connectionDidFinishLoading:
. This fixes #872 - 7f39e5e304 - Not Modified
HTTP status code handling - #942kPNGSignatureData
data - #981Published by bpoplauschi about 10 years ago
sd_imageOrientationFromImageData:
crash if imageSource is nil - #819 #813 #808 #828 - temporary fixSDWebImageCombinedOperation cancel
crash (also visible as SDWebImageManager cancelAll
) - 28109c4 #798 #809mark
from pragma mark
- #827Published by bpoplauschi over 10 years ago
UIImageView+HighlightedWebCache
- #646 #765NSURLConnectionDelegate
- #711 50c4d1dSDWebImageDownloader setSuspended:
- #734SDImageCache removeImageForKey:withCompletion:
- #732 cd4b925SDWebImageManager cacheKeyForURL:
- 5fd21e5SDWebImageManager
instance from the SDWebImagePrefetcher
class - 6c409cdSDWebImageManager
uses the shared instance of SDWebImageDownloader
- 0772019SDWebImageManager cachedImageExistsForURL:
to check if an image exists in either the disk OR the memory cache - #644UIImageView
. Replaces #541 - #599 30f6726diskImageExistsWithKey:
deadlock - #625 6e4fbafSDWebImageManager
cachedImageExistsForURL:completion:
and diskImageExistsForURL:completion:
performSelector:onThread:withObject:waitUntilDone:
- #698runningOperations
- #68NSURLConnection
response statusCode not valid (e.g. 404), downloader never stops its runloop and hangs the operation queue - #735SDWebImageRefreshCached
bug for large images - #744SDWebImageDownloaderLowPriority
- #713 #745cacheKeyFilter
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 - eb91fdddispatch_main_async_safe
macro - #505 af3e4f8SDScaledImageForKey
if the input image is nil - #365 #750SDWebImageDelayPlaceholder
option specified - #780startPrefetchingAtIndex:
method from main queue - #694SDWebImageCompat.m
to SDWebImage+MKAnnotation
targetPublished by rs over 10 years ago
Published by rs over 10 years ago
Published by rs about 11 years ago