Merge pull request #2854 from dreampiggy/revert_heic_default_coder
Revert animated heic coder from default coder list due to Apple's performance issue
This commit is contained in:
commit
fbf7eb2f46
|
@ -52,7 +52,8 @@
|
|||
target:self
|
||||
action:@selector(flushCache)];
|
||||
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]]; // For WebP static/animated image
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]]; // For HEIC static/animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
|
||||
// HTTP NTLM auth example
|
||||
// Add your NTLM image url to the array below and replace the credentials
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
Note: the `coders` getter will return the coders in their reversed order
|
||||
Example:
|
||||
- by default we internally set coders = `IOCoder`, `GIFCoder`, `APNGCoder`, 'HEICCoder' (iOS 11+)
|
||||
- calling `coders` will return `@[IOCoder, GIFCoder, APNGCoder, HEICCoder]`
|
||||
- by default we internally set coders = `IOCoder`, `GIFCoder`, `APNGCoder`
|
||||
- calling `coders` will return `@[IOCoder, GIFCoder, APNGCoder]`
|
||||
- call `[addCoder:[MyCrazyCoder new]]`
|
||||
- calling `coders` now returns `@[IOCoder, GIFCoder, APNGCoder, HEICCoder, MyCrazyCoder]`
|
||||
- calling `coders` now returns `@[IOCoder, GIFCoder, APNGCoder, MyCrazyCoder]`
|
||||
|
||||
Coders
|
||||
------
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
if (self = [super init]) {
|
||||
// initialize with default coders
|
||||
_imageCoders = [NSMutableArray arrayWithArray:@[[SDImageIOCoder sharedCoder], [SDImageGIFCoder sharedCoder], [SDImageAPNGCoder sharedCoder]]];
|
||||
if (@available(iOS 11, macOS 10.14, tvOS 11, watchOS 4, *)) {
|
||||
[_imageCoders addObject:[SDImageHEICCoder sharedCoder]];
|
||||
}
|
||||
_codersLock = dispatch_semaphore_create(1);
|
||||
}
|
||||
return self;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
Image/IO provide the static HEIC (.heic) support in iOS 11/macOS 10.13/tvOS 11/watchOS 4+.
|
||||
Image/IO provide the animated HEIC (.heics) support in iOS 13/macOS 10.15/tvOS 13/watchOS 6+.
|
||||
See https://nokiatech.github.io/heif/technical.html for the standard.
|
||||
@note This coder is not in the default coder list for now, since HEIC animated image is really rare, and Apple's implementation still contains performance issues. You can enable if you need this.
|
||||
@note If you need to support lower firmware version for HEIF, you can have a try at https://github.com/SDWebImage/SDWebImageHEIFCoder
|
||||
*/
|
||||
@interface SDImageHEICCoder : SDImageIOAnimatedCoder <SDProgressiveImageCoder, SDAnimatedImageCoder>
|
||||
|
|
Loading…
Reference in New Issue