0
我想保存一个带“.wai”扩展名的图像,发送它通过whatsapp.h ow我可以保存图像的格式? 的WhatsApp的网站没有一个示例代码,以获取更多信息这是链接(想必访问此链接你明白我的问题),如果你只是重命名`.JPG会发生什么用自定义格式保存uiimage
http://www.whatsapp.com/faq/en/iphone/23559013
我想保存一个带“.wai”扩展名的图像,发送它通过whatsapp.h ow我可以保存图像的格式? 的WhatsApp的网站没有一个示例代码,以获取更多信息这是链接(想必访问此链接你明白我的问题),如果你只是重命名`.JPG会发生什么用自定义格式保存uiimage
http://www.whatsapp.com/faq/en/iphone/23559013
NSData *pngData = UIImagePNGRepresentation(drawimg.image);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0]; //Get the docs directory
filePath = [documentsPath stringByAppendingPathComponent:@"edited.wai"]; //Add the file name
[pngData writeToFile:filePath atomically:YES];
'或'.png'到'.wai'?可以这么简单。 – Cyrille