开发者

iphone photo frame application

开发者 https://www.devze.com 2023-01-13 22:59 出处:网络
i am creating photo frame application how can i merge photo and frame in one single png and save it开发者_开发知识库 to the bundle or document folder.//UIGraphicsBeginImageContext(im1.frame.size);

i am creating photo frame application how can i merge photo and frame in one single png and save it开发者_开发知识库 to the bundle or document folder.


//UIGraphicsBeginImageContext(im1.frame.size);
UIGraphicsBeginImageContext(im2.frame.size);

[im1.image drawInRect:CGRectMake(0.0, 0.0, im2.frame.size.width, im2.frame.size.height)];
[backdrop.layer renderInContext:UIGraphicsGetCurrentContext()];
[im2.image drawInRect:CGRectMake(0.0, 0.0, im2.frame.size.width, im2.frame.size.height) blendMode:kCGBlendModeNormal alpha:1.0];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
//NSData *dataObj = UIImagePNGRepresentation(image);
//NSString *picturedata = [dataObj base64Encoding];
appDelegate.fbpost=image;

//appDelegate.image11=image;

[UIImagePNGRepresentation(image) writeToFile:[self findUniqueSavePath] atomically:YES];

// Set the background
//SETIMAGE(image);

// Show the current contents of the documents folder
CFShow([[NSFileManager defaultManager] directoryContentsAtPath:[NSHomeDirectory() stringByAppendingString:@"/Documents"]]);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号