关于uiimage

来源:互联网 发布:vidconvert mac 破解 编辑:程序博客网 时间:2024/06/05 04:44
http://www.cnblogs.com/ygm900/archive/2013/06/04/3117923.html
静态方法:
UIImage *myImage = [UIImage imageNamed:@"ppp"];
NSData *imageData = [ NSData initWithBytes:image:imagePtr length:imageSize ]; // 假设 imagePtr 是一个指向原始数据的指针UIImage* myImage = [ [ UIImage alloc ]initWithData:imageData ];
UIImage* myImage3 = [UIImage imageWithCGImage:myCGImageRef];
UIImage* myImage4 = [[UIImage alloc]initWithContentsOfFile:[NSString stringWithFormat:@"%@/Documents/ppp.png",NSHomeDirectory()]];URLWithString:@"http://www.kutx.cn/xiaotupian/icons/png/200803/20080327095245737.png"]] ];

0 0
原创粉丝点击