Skip to content

Releases: twitter/ios-twitter-image-pipeline

v2.24.2

26 Oct 19:33
5ac4bc2
Compare
Choose a tag to compare

Update WebP Codec (includes fixing WebP animations)

v2.24.1

20 Oct 21:00
75e76a2
Compare
Choose a tag to compare

Bump version to support CocoaPod subspecs for WebP and MP4 codecs

v2.24.0

10 Aug 21:12
20b3c27
Compare
Choose a tag to compare

2.24.0

  • Drop iOS 8 and iOS 9 support

2.23.5

  • Refactor WebP decoder to support animation decoding and improve efficiency
    • Requires WebPDemux.framework for iOS (the Catalyst lib already has the necessary bits)
    • The TIPXWebPCodec also supports progressive loading (rendering the first frame while more data is loading)
      • This makes it potentially a better choice as a decoder than the iOS 14+ built in decoder, depending on your use case
    • Improve decoder to support having static WebP images decode into the provided target sizing for better efficiency

2.23.2

  • Update to WebP v1.1.0
    • Also fixes building WebP for Apple Silicon Catalyst builds

2.23.1

  • Optimize the rendered cache unloading when clearMemoryCachesOnApplicationBackgroundEnabled is YES
    • When the app goes into the background, the rendered cache used to clear the oldest rendered images and just keep a max of 50% of the rendered cache capacity for when the app resumes
      • This was mostly effective for keeping the on screen images in cache avoiding any flashing UI, but had edge cases that could lead flashing or holding onto too much in memory that isn't needed for app resumes
    • Now, the rendered cache will turn each cache entry as weak and on app resume, these weak entries will be made strong again.
      • This will have the effect of all rendered cache images with no references being purged, but all those references being retained
      • Effectively, any UI that is holding the rendered images will keep those around for when the app resumes, making it seemless
      • For any UI that has unloaded its images when not visible, those images will be purged and will reload when the view becomes visible again
      • This works especially well with TIPImageViewFetchHelper when disappearanceBehavior is TIPImageViewDisappearanceBehaviorUnload or TIPImageViewDisappearanceBehaviorReplaceWithPlaceholder

2.23.0

  • Replace TIPImageFetchProgressiveLoadingPolicy class methods with C functions
    • Swift does not like having an @interface have the same name as an @protocol
    • It can work, but gets very messy
    • Best to avoid it and replace the convenient class method interfaces in Objective-C with C functions
    • Though this is a minor version bump, it is API breaking
      • There isn't a way to deprecated the old APIs and introduce new ones, we just have to remove the old ones to fix usages in Swift
      • Apologies for the inconvenience!

2.22.0

  • Add TIPImageFetchSkipStoringToRenderedCache to TIPImageFetchOptions
    • This permits a fetch to skip storing to the synchronous rendered cache altogether after a fetch
    • This is useful for UI that displays a large image but is not frequented regularly, such as a full screen image view
    • By avoiding infrequent images going to rendered cache, the rendered cache can keep more relevent images in cache (or can be configured to be smaller)
  • Add TIPImageViewDisappearanceBehaviorUnload to TIPImageViewDisappearanceBehavior
    • This new behavior will set the fetchView image to nil on disappearance
    • This new feature can really level up an app at keeping a memory footprint down automatically, no extra work is needed when using TIPImageViewFetchHelper for displaying images!
  • Add TIPImageViewDisappearanceBehaviorReplaceWithPlaceholder to TIPImageViewDisappearanceBehavior
    • This new behavior will set the fetchView image to a placeholder (low resolution) version on disappearance, which will be replace with the full image on visible return
    • Similar benefits to TIPImageViewDisappearanceBehaviorUnload but with the compromise of keeping a little more RAM for a placeholder to avoid UI situations that could yield an empty image view temporarily as the full image is decoded (notably for large images or slow devices)
  • Rename TIPImageViewFetchHelper class' fetchDisappearanceBehavior to disappearanceBehavior
  • Add shouldTreatApplicationBackgroundAsViewDisappearance property to TIPImageViewFetchHelper
    • This BOOL property will opt the fetch helper into using the disappearance behavior when the app backgrounds
    • Another big improvement for app memory footprint as the large amount of RAM used for images can be unloaded on app background, reducing the risk of the app being jettisoned!
    • Impact is really great for large images on screen when backgrounded, be sure to set to YES for your large image views!

2.21.5

  • Adopt direct support for Objective-C code and eliminate PRIVATE_SELF C function pattern
    • Preserves Objective-C calling syntax for better code legibility (less C-style calls interleaving ObjC)
    • Safer than PRIVATE_SELF C functions (don't need to check self != nil)
    • Avoids awkward self->_ivar access in the direct methods (can stick with just using _ivar)
    • Same low binary overhead as private C functions

2.21.0

  • Revise TIPError.h to be much more Swift compatible

2.20.5

  • Revise WebP support by adding iOS 14 decoder and integrating that with existing TIPXWebPCodec
    • Also means Animated WebP are supported (decode only) on iOS 14+ now

2.20.0

  • Fundamentally apply a rearchitecture to Twitter Image Pipeline
    • First: when loading images from data or files, the target sizing (dimensions & content mode) can now be used by codecs for more efficient decoding
      • This means that decoding a large image into a view port that is smaller can now decode directly into the appropriate size, reducing RAM and CPU of the decode AND avoiding needing to scale the image down before delivering the image as a result (more CPU savings)
      • This is implemented with the ImageIO based codecs, but not the extended codecs (WebP and MP4)...yet
    • Second: there are 3 caches in TIP: Rendered image cache, In Memory image cache, and On Disk image data cache.
      • The In Memory cache has been been restructured to cache the compressed image data instead of the image itself
      • This means:
        • Less RAM is needed for this middle cache
        • Less RAM is used when decoding the image to serve as a response
        • No more scaling the image from full size to the size to serve as a response (for core image codecs)
  • Given how substantial this change is, we are bumping from version 2.13 to 2.20
    • In particular, custom codecs will need to be updated to support the new targetDimensions and targetContentMode arguments

v2.13.5

31 May 05:01
451dffc
Compare
Choose a tag to compare

2.13.5

  • Add WebP support to Catalyst builds
    • See WEBP_README.md
  • Miscellaneous performance improvements
    • Async load the default codes to avoid main thread blockage on app launch
    • Tighter memory management with autorelease pools
    • TIPImageFetchHelper will now register for all image cache updates and filter on observation vs registering against specific pipelines, which avoids register/unregister locking performance impact
    • Add TIPDetectImageTypeFromFile(...) for efficient and effective image type detection from a file
  • Add replacements for UIImagePNGRepresentation and UIImageJPEGRepresentation
    • Unifies to the TIP codec based encoding rather than the UIKit implementation which can be unreliable for consistency.
    • Provides progressive support for JPEG variant of functionality.
    • See -[UIImage tip_PNGRepresentation] and -[UIImage tip_JPEGRepresentationWithQuality:progressive:]
  • Add some palette based image utilities
    • -[UIImage tip_canLosslesslyEncodeUsingIndexedPaletteWithOptions:]
  • Fix bug where a GIF load may be incomplete in response but complete in data loaded failing to load in TIP
    • Mostly an issue with some CDN vendors terminating the HTTP response incorrectly

2.13.2

  • Add [TIPGlobalConfiguration defaultInterpolationQuality]
    • By default, will use CGInterpolationQualityDefault which is same behavior as before
    • Add quality arg to image scaling with [UIImage tip_scaledImageWithTargetDimensions:contentMode:interpolationQuality:decode:]

2.13.1

  • Add [TIPImageFetchDelegate tip_imageFetchOperation:didLoadDirtyPreviewImage:] support
    • This allows for the rendered cache to mark a specific entry dirty (by identifier)
    • On fetch operation load, the dirty preview can be synchronously loaded while the op continues on async
    • This helps systems where a larger version of an image with a shared identifier loads and matching fetch helpers that are not visible in the UI take note in order to refresh with the better resolution image, but without the risk of clearing that image's render cache which can lead to a 1 or 2 frame "flash" of the image loading async from cache

v2.12.2

04 Jun 18:50
63deaed
Compare
Choose a tag to compare

2.12.2

  • Add automatic handling of unnecessary image download errors when the download has finished loading
    • It is not uncommon for a service/CDN to yield an error after the final byte of the response has been loaded by the client
    • The consequence of treating a successful load as a failure is that upon next fetch for that image an unnessecary network request will trigger:
      • For image resumption supported loads, resumes the load beyond the available byte range
      • For full image loads, a redundant download
    • When TIP sees an error on image download but has all the bytes (looking at Content-Length header), TIP now posts TIPProblemImageDownloadedWithUnnecessaryError problem

Also

  • Fix a number of bugs
  • Add more util methods to UIImage category

v2.12.1

21 Feb 23:43
9d98639
Compare
Choose a tag to compare
  • Fix bugs related to capping the sizes of caches
    • Capping a cache to 0 bytes would not completely disable it as documented, fixed
    • Setting the max ratio value to a negative value would not use the default value as documented, fixed
    • Thanks to @jml5qh for filing this issue (#41)
  • Analyzer warning fixes too (not actual bugs)

v2.12.0

03 Jan 18:58
8b3eff1
Compare
Choose a tag to compare
  • Fix bug in Fetch Helper related to view hide/show
  • Update global config defaults for memory cache sizes
  • Add HEIC/AVCI support (when available on the device)

v2.11.0

28 Oct 19:17
b4f81e8
Compare
Choose a tag to compare
  • add support for animated images with TIPImageViewFetchHelper by supporting TIPImageContainer as well as UIImage
    • to support animated images, implement a UIView that adopts TIPImageFetchable with tip_fetchedImageContainer that can animate the provided TIPImageContainer
    • update TIPImageFetchable
      • add tip_fetchedImageContainer as optional property
      • mark tip_fetchedImage as optional
      • require at least one of the two methods be implemented to conform to TIPImageFetchable
    • add helper functions:
      • TIPImageFetchableHasImage
      • TIPImageFetchableGetImage and TIPImageFetchableGetImageContainer
      • TIPImageFetchableSetImage and TIPImageFetchableSetImageContainer
    • update TIPImageViewFetchHelper
      • add setImageContainerAsIfLoaded:
      • add setImageContainerAsIfPlaceholder:
    • update TIPImageViewFetchHelperDataSource
      • add tip_imageContainerForFetchHelper:
    • update TIPImageViewFetchHelperDelegate
      • add tip_fetchHelper:didUpdateDisplayedImageContainer:fromSourceDimensions:isFinal:
      • deprecate tip_fetchHelper:didUpdateDisplayedImage:fromSourceDimensions:isFinal:
      • add tip_fetchHelper:shouldReloadAfterDifferentFetchCompletedWithImageContainer:dimensions:identifier:URL:treatedAsPlaceholder:manuallyStored:
      • deprecate tip_fetchHelper:shouldReloadAfterDifferentFetchCompletedWithImage:dimensions:identifier:URL:treatedAsPlaceholder:manuallyStored:
  • Move to Xcode 10
    • split unit tests up for parallelize builds (so much faster!!)
    • parallelize builds don't work with Travis CI, so they are disabled by default :(

v2.10.0

29 Aug 17:13
45d2042
Compare
Choose a tag to compare
  • Fix MP4 decoder when decoding anamorphic mp4s into animations
  • drop iOS 7 support
  • fix miscellaneous bugs
  • clean up misc style
  • add tvOS support

v2.9.2

14 May 18:21
d5eacbd
Compare
Choose a tag to compare
  • Style updates
    • colon ':' align code
    • split code up more to fit on less horizontal space for easier
      code reviews
  • Replace private methods with static C functions
    • methods have runtime load overhead and binary size overhead
    • using methods for private code is wasteful to the framework
      consumer
    • replace all private methods with static C functions to reduce
      binary size and improve consuming app launch time perf (slightly)
    • Twitter Image Pipeline is being a good citizen for consuming
      apps, every little bit helps
  • Remove sample app xcscheme dependency of TIP framework for
    better Carthage support
  • Move update to tip_fetchedImage in fetch helper so that
    the implementer of tip_fetchedImage can query the current state
    of the fetch helper at the time the update happens. Can help
    with animations.
  • Optimize image scaling on iOS 10+ to use UIGraphicsImageRenderer
    • GraphicsRendererSpeed sample app added to validate perf
  • Added TIPRenderImage to TIPImageUtils
  • Added tip_imageWithRenderFormattings:render: to UIImage+TIPAdditions