pragma mark - 合成图

#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;

}

}

上一篇:yourphp内置编辑器


下一篇:设置Android Studio启动时可选最近打开过的工程