簡體   English   中英

iPhone相框應用

[英]iphone photo frame application

我正在創建相框應用程序,我如何將照片和相框合並為一個png並將其保存到文件包或文檔文件夾中。

//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"]]);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM