reformat code
This commit is contained in:
parent
20bada38a0
commit
adffebc8fb
|
|
@ -26,11 +26,15 @@
|
|||
case 0x52:
|
||||
// R as RIFF for WEBP
|
||||
if ([data length] < 12)
|
||||
{
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
|
||||
if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"])
|
||||
{
|
||||
return @"image/webp";
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue