diff --git a/YYImage/YYFrameImage.m b/YYImage/YYFrameImage.m index 93efe88..416d97f 100644 --- a/YYImage/YYFrameImage.m +++ b/YYImage/YYFrameImage.m @@ -68,7 +68,7 @@ - (instancetype)initWithImagePaths:(NSArray *)paths frameDurations:(NSArray *)fr NSData *firstData = [NSData dataWithContentsOfFile:firstPath]; CGFloat scale = _NSStringPathScale(firstPath); UIImage *firstCG = [[[UIImage alloc] initWithData:firstData] yy_imageByDecoded]; - self = [self initWithCGImage:firstCG.CGImage scale:scale orientation:UIImageOrientationUp]; + self = [self initWithCGImage:firstCG.CGImage scale:scale orientation:firstCG.imageOrientation]; if (!self) return nil; long frameByte = CGImageGetBytesPerRow(firstCG.CGImage) * CGImageGetHeight(firstCG.CGImage); _oneFrameBytes = (NSUInteger)frameByte; @@ -94,7 +94,7 @@ - (instancetype)initWithImageDataArray:(NSArray *)dataArray frameDurations:(NSAr NSData *firstData = dataArray[0]; CGFloat scale = [UIScreen mainScreen].scale; UIImage *firstCG = [[[UIImage alloc] initWithData:firstData] yy_imageByDecoded]; - self = [self initWithCGImage:firstCG.CGImage scale:scale orientation:UIImageOrientationUp]; + self = [self initWithCGImage:firstCG.CGImage scale:scale orientation:firstCG.imageOrientation]; if (!self) return nil; long frameByte = CGImageGetBytesPerRow(firstCG.CGImage) * CGImageGetHeight(firstCG.CGImage); _oneFrameBytes = (NSUInteger)frameByte;