#pragma mark - 合成图
- (UIImage *)getShareImageShell:(UIImage *)shareImage {
if (shareImage) {
CGSize size = CGSizeMake(640, 1084);
// UIGraphicsBeginImageContextWithOptions(outputSize, NO, 0.5);设置透明 质量系数
UIGraphicsBeginImageContext(size);
CGContextRef c = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(c, [UIColor VIMIGrayBackgroundColor].CGColor);
CGContextFillRect(c, CGRectMake(0, 0, size.width, size.height));
[shareImage drawInRect:CGRectMake(80, 100, 490, 490)];
[[UIImage imageNamed:@"share_shell"] drawInRect:CGRectMake(0, 0, size.width, size.height)];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
return image;
}else {
return nil;
}
}