【问题标题】:Save uiimage with custom format以自定义格式保存 uiimage
【发布时间】:2013-10-21 09:23:53
【问题描述】:

我想保存带有“.wai”扩展名的图像,以便通过 whatsapp.h 发送 我可以用这种格式保存图像吗? whatsapp 网站没有示例代码,有关更多信息,这是链接(可能访问此链接您了解我的问题)

http://www.whatsapp.com/faq/en/iphone/23559013

【问题讨论】:

  • 如果您只是将 .jpg.png 重命名为 .wai 会发生什么?就这么简单。

标签: iphone uiimage whatsapp


【解决方案1】:
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];

【讨论】:

    猜你喜欢
    • 2011-04-29
    • 1970-01-01
    • 1970-01-01
    • 2018-06-26
    • 2018-06-30
    • 2015-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多