SDWebImage

Asynchronous image downloader with cache support as a UIImageView category

MIT License

Stars
24.9K
Committers
321

Bot releases are visible (Hide)

SDWebImage - 5.15.7 - Fix Crash

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.7 release

Fixes

  • Try to solve the strange dispatch group crash in SDSafeExecute by removing inline #3526

Performance

  • Opt when multiple same URLs queried in parallel, which may cause duplicated decode and store disk operation #3523
SDWebImage - 5.15.6 - Fix watchOS

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.6 release

Performance

  • Small improvements to SDDiskCache write perf #3517
    • Note this slightly change the behavior when you manual grab the SDImageCache.diskCachePath and remove it without creating new directory, next disk cache write operation will fail, before the restart of App.

Fixes

  • Revert the SDDisplayLink for watchOS, fix the animated image duration bug #3520 #3511

Warnings

  • Fix the warning of C function with no param #3519
SDWebImage - 5.15.5 - Fix

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.5 release

Fixes

  • Protect the disk operation when input key is nil and cause exception #3505 #3504
  • Fix the blur effect logic by avoid color convert and always use three box-blur methodology #3506
SDWebImage - 5.15.4 - Hotfix

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.4 release

Fixes

  • Fix the crash because of wrong usage of NS_NOESCAPE for SDCallbackQueue async block, should matching DispatchQueue #3500
    • This crash only occurs in specified version of clang compiler. But still recommended to update
SDWebImage - 5.15.3 - Promotion Fix

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.3 release

Fixes

  • Fix the issue when multiple request for same url failed, the completedBlock will callback more times #3497 #3493
  • Try to fix the SDAnimatedImageView playback speed issue in Promotion devices (iPhone Pro) #3496 #3491
SDWebImage - 5.15.2 - Race Condition Fix

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.2 release

Fixes

  • Fix the atomic logic between downloader and operation again #3483

Warnings

  • Code garden to change Objc bool from true/false to YES/NO #3484
SDWebImage - 5.15.1 - Race Condition Fix

Published by dreampiggy over 1 year ago

See all tickets marked for the 5.15.1 release

Fixes

  • Ensure the Downloader and DownloaderOperation callback the completion in atomic and never miss one #3477
    • This fix a long-term issue when multiple download request for same URL at the same time, some callbacks will missing. After fix, this will cause a brand new HTTP request but never miss any callbacks.
  • Fix the issue the fallback logic of ImageIO Source should avoid passing any UTI hint #3473
  • Try to fix the SDAsyncBlockOperation's race condition #3479 #3275
  • Avoid compiler generate the wrong property attribute with non-atomic #3474

Performance

  • Remove the unused extra copy for SDAnimatedImage data initializer #3480
SDWebImage - 5.15.0 - Performance Enhancement

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.15.0 release

Features

Encoder

  • Added encodeWithFrames API for animation encoding in custom coder, better for usage #3469
    • Previously you have to wrap SDImageFrame array into temp image object for encoding, this cause wrap/unwrap performance cost (even bad on macOS because it implicit triggers temp GIF encoding). Now you can directly pass it into new encodedDataWithFrames: APIs.

Decoder

  • Update the decode solution to allows CoreGraphics avoid using any UIKit method #3468

Cache

  • Seperate the SDImageCache encode queue and IO queue to match waitStoreCache behavior #3466
    • Now, the encode process does not block IO queue and query disk cache faster. Previously SDWebImageWaitStoreCache is useless when you use transformer or cache serializer. Now you MUST pass this if you want to query disk cache inside completionBlock.

Manager/Cache/Loader

  • Added context option callbackQueue and SDCallbackQueue wrapper for advanced user to control which queue to callback #3465 #3457
    • If you want SDWebImage callback your completion in current non-main queue, pass .context[.callbackQueue] = SDCallbackQueue.current
  • Added SDWebImageContextImageEncodeOptions to pass encode options like compression quality to SDImageCache storeImage API #3466
    • The re-encode and store cache logic happens if you use transformer or custom cache serializer, now you can pass the encode options.
SDWebImage - 5.14.3 - 5.14 Opt

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.14.3 release

Performance

  • Added ioQueueAttributes to use concurrent or control QoS for image cache internal IO Queue #3460
  • When frame timestamp not reached, we should prefetch frame in advance for image render #3452

Fixes

  • Fix the iOS 15+ force-decode hack break Apple's HEIF and JPEG YUV420 optimization #3461
  • The poster image should not trigger a frameChange callback #3459
SDWebImage - 5.14.2 - 5.14 Fix

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.14.2 release

Fixes

  • Move the SD_CHECK_CGIMAGE_RETAIN_SOURCE assertion to SDWebImage Demo and Tests only #3443 #3442 #3441
SDWebImage - 5.14.1 - 5.14 Crash Fix

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.14.1 release

Fixes

  • Fix the iOS 12 crash because the underlyingQueue is nil #3434 #3433
  • Fix the missing lock for callbackTokens which may cause thread-safe issue #3439 #3438
  • Use CoreGraphics to decode PDF instead of ImageIO to solve iOS 16's issue #3436
SDWebImage - 5.14.0 - Meet DecodeOptions

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.14.0 release

Behavior Changes

  • Introduce SDWebImageContextImageDecodeOptions, deprecate SDImageCoderWebImageContext #3421
    • Note the deprecated SDImageCoderWebImageContext is no longer used. Update your codebase to use SDWebImageContextImageDecodeOptions to pass extra information from manager to coder. Loaded image will also store the same information in image.sd_decodeOptions
  • Refactor the hack when multiple different thumbnail image requests for same url called at the same time #3423
    • Now the SDWebImageDownloader can callback each thumbnail request for same url with the correct image size as well (previously can't)
    • Now if manager's callback image is thumbnail (image.sd_isThumbnail == YES), or transformed (image.sd_isTransformed == YES), the callback data will be nil. This because the image does not match downloaded data actually. If you really need original full size data, query the disk cache again using the original key. You may need SDWebImageWaitStoreCache options as well. (previously behavior is undefined, may callback with full size data, or encoded small size data, or even nil)

Features

Coder

  • Support use url.path or custom UTI hint passed to ImageIO, solve the TIFF/NEF/SRW raw image decoding with wrong size #3419
    • Note from 5.14.0, we may pass the file extension to coder as a UTI hint
  • Added SDImageCoderDecodeUseLazyDecoding to control whether to use lazy-decoding for ImageIO #3425
    • Note from 5.14.0, by default we enable lazy decoding for static image coder, disable lazy decoding for animated image coder, suitable for most cases. If you want, pass .decodeUseLazyDecoding = YES to context option .imageDecodeOptions

Performance

  • Introduce new workaround to strip CGImage retained CGImageSource on iOS 15 #3425 #3387
    • Note this also fix the limitation that you can not use lazy-decoding for animated image on iOS 15+. Pass .decodeUseLazyDecoding = YES to context option .imageDecodeOptions
  • Replace conformsToProtocol call with appropriate respondsToSelector check to improve performance #3429 Thanks @timonus
  • Fix del redundant autoreleasepool #3388 Thanks @dongranGG

Fixes

  • Avoid store again when origin disk cache hit during Thumbnail or Transformer with smaller pixel size #3428 #3395
  • Add the possible nullable logic check when the force-decode/copy failed #3427
SDWebImage - 5.13.5 - 5.13 Fix

Published by dreampiggy almost 2 years ago

See all tickets marked for the 5.13.4 release

Fixes

  • Quick fix the issue that UIImage.sd_decodeOptions cause retain cycle when pass custom cache in context option #3420 #3371
SDWebImage - 5.13.4 - 5.13 Crash Fix

Published by dreampiggy about 2 years ago

See all tickets marked for the 5.13.4 release

Fixes

  • Fix the potential out of bounds crash for ImageIO incremental animation decoding (like GIF) #3408
SDWebImage - 5.13.3 - 5.13 Crash Fix

Published by dreampiggy about 2 years ago

See all tickets marked for the 5.13.3 release

Fixes

  • Try to workaround iOS 15+ crash that CGImage retain the CGImageSource during animation image playing #3387
  • Fix the crash because of SDWebImageCombinedOperation recursive lock #3403
  • Synchronise getter and setter of the cancelled property of the SDWebImageCombinedOperation #3393
  • Fix the switching from animated image rendering to static image does not works on macOS 11+ #3402
SDWebImage - 5.13.2 - 5.13 Patch

Published by dreampiggy about 2 years ago

See all tickets marked for the 5.13.2 release

Fixes

  • Fix the rare case when cancel an async disk cache query may cause twice callback #3380 #3374
  • This Bug effect version 5.13.0-5.13.1

Warnings

  • Fix pragma mark typo #3379
SDWebImage - 5.13.1 - 5.13 Patch

Published by dreampiggy over 2 years ago

See all tickets marked for the 5.13.1 release

Features

  • Added SDImageCoderHelper.defaultDecodeSolution to control the force decode solution. Automatic by default #3368 #3365
  • Now imageByPreparingForDisplay is only applied for JPEG/HEIF images. If you want the 5.12.0 behavior, set the solution to .coreGraphics instead

Fixes

  • Fix the PDF image without thumbnailPixelSize will result huge bitmap size, now fixed into 72 DPI matching PDFKit #3370
  • Fix sd_colorAtPoint and sd_colorsWithRect support for grayscale image (white and alpha) #3372

Warnings

  • Fix the clang analyze issue #3373
SDWebImage - 5.13.0 - Thumbnail

Published by dreampiggy over 2 years ago

See all tickets marked for the 5.13.0 release

Features

Thumbnail

  • Change thumbnail cache behavior as expected, share cache through different loading pipeline without extra download #3362
  • Now the thumbnail behavior more like transformer. When request different thumbnail size and cache miss, it prefers to query full size disk cache again, then decode for request thumbnail size without actual network download

Coder

  • Added new API for custom coder better handling the thumbnail size #3359

Cache

  • Allows store image data only and introduce async API #3336
  • Now the queryCacheOperationForKey API return SDImageCacheToken instead of useless placeholder NSOperation. When you cancel the cache query from main queue, it will callback in sync instead of async

Performance

  • Support using iOS 15 UIImage new API imageByPreparingForDisplay for faster force decoding #3355 #3340

Fixes

  • Fix the encodeMaxPixelSize logic #3357
  • Fix the case when user cancel the image loading for same URL in sequence cause placeholder mass #3363

Extra - Collaborator and maintainer wanted

After 4 years of maintainess of SDWebImage open source project, I have met many interesting areas in pass 2 years, like LLVM/Swift, like Rust. And I have the full-time job. So the maintainess will become slower down.
If anyone who was interested in the future of SDWebImage open source project, please feel free to contact me via email or discussions 🙏

SDWebImage - 5.12.6 - 5.12 Patch

Published by dreampiggy over 2 years ago

Fixes

  • Fix the thumbnail pixel size calculation when preserveAspectRatio is true #3354
  • Fix macOS compile on Xcode 14 which missing necessary CoreImage import #3353
  • Fix a crash of accessing +[NSScreen mainScreen] from background thread on OSX 10.11. #3337

Performance

  • Small performance improvement to generating file URLs in SDDiskCache -setData:forKey: #3346
SDWebImage - 5.12.5 - 5.12 Patch

Published by dreampiggy over 2 years ago

Fixes

  • Workaround iOS 15+ force decode again using Image Renderer(preferred) and RGB888 #3334

This version fix the CoreGraphics warning when using PNG and force-decode(by default without .avoidDecodedImage)