Fix test case compile issue on macOS

This commit is contained in:
DreamPiggy 2020-04-21 17:49:40 +08:00
parent d76fb76e0d
commit 9a75441634
1 changed files with 5 additions and 1 deletions

View File

@ -251,7 +251,11 @@
expect(thumbnailImages.count).equal(0);
CGImageRef imageRef = CGImageSourceCreateImageAtIndex(source, 0, nil);
UIImage *image = [[UIImage alloc] initWithCGImage:imageRef];
#if SD_UIKIT
UIImage *image = [[UIImage alloc] initWithCGImage:imageRef scale:1 orientation: UIImageOrientationUp];
#else
UIImage *image = [[UIImage alloc] initWithCGImage:imageRef scale:1 orientation:kCGImagePropertyOrientationUp];
#endif
CGImageRelease(imageRef);
// Encode with embed thumbnail
NSData *encodedData = [SDImageIOCoder.sharedCoder encodedDataWithImage:image format:SDImageFormatHEIC options:@{SDImageCoderEncodeEmbedThumbnail : @(YES)}];