当前位置:编程学习 > wap >>

图片格式转化为imagedata格式

 
 
 
 
 
    UIImage *addPic = [UIImage imageNamed: @"ko.png"];
 
    NSData *imageData = UIImagePNGRepresentation(addPic);// png
 
    // NSData *imageData = UIImageJPEGRepresentation(addPic, 1);// jpeg
 
    [picker addAttachmentData: imageData mimeType: @"" fileName: @"ko.png"];
 
 
 
 
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,