From a71b7b63c4fdab845b268346902da579d97aaa0a Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 27 Oct 2017 17:13:42 +0800 Subject: [PATCH] Add all 4 standard HEIC brand file signature, ftypheic & ftypheix is for single image, ftyphevc & ftyphevx is for sequence image --- SDWebImage/NSData+ImageContentType.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SDWebImage/NSData+ImageContentType.m b/SDWebImage/NSData+ImageContentType.m index 888a8107..6a590611 100644 --- a/SDWebImage/NSData+ImageContentType.m +++ b/SDWebImage/NSData+ImageContentType.m @@ -51,9 +51,12 @@ } case 0x00: { if (data.length >= 12) { - //....ftypheic + //....ftypheic ....ftypheix ....ftyphevc ....ftyphevx NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(4, 8)] encoding:NSASCIIStringEncoding]; - if ([testString isEqualToString:@"ftypheic"]) { + if ([testString isEqualToString:@"ftypheic"] + || [testString isEqualToString:@"ftypheix"] + || [testString isEqualToString:@"ftyphevc"] + || [testString isEqualToString:@"ftyphevx"]) { return SDImageFormatHEIC; } }