Skip to content

Tags: twitter/ios-twitter-image-pipeline

Tags

2.24.2

Toggle 2.24.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
V.2.24.2 (#60)

* Update WebP codec

* fix doc/spec versions

2.24.1

Toggle 2.24.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
bump version to 2.24.1 (#59)

2.24.0

Toggle 2.24.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update to v2.24.0 (#55)

* Update to v2.24.0

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

* fix build break for sample app

2.13.5

Toggle 2.13.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update to v2.13.5 (#51)

* Update to v2.13.5

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

* update podspec and travis yml

2.13.0

Toggle 2.13.0's commit message

2.12.2

Toggle 2.12.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update TIP to v2.12.2 (#45)

### 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, many misc bug fixes

2.12.1

Toggle 2.12.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update to v2.12.1 (#42)

- 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)

2.12.0

Toggle 2.12.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update to v2.12.0 (#40)

* Update to v2.12.0

- 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)

* update build for travis ci

(Note: Travis CI virtual boxes do not have the resources to run the unit tests anymore.)

2.11.0

Toggle 2.11.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update to TIP 2.11.0 (#36)

* update to TIP 2.11.0

2.10.0

Toggle 2.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
V2.10.0 (#35)

* Update TIP to v2.10.0

- Fix MP4 decoder when decoding anamorphic mp4s into animations
- drop iOS 7 support
- fix miscellaneous bugs
- clean up misc style
- fix tvOS support
- add tvOS target