对图片加入特定水印的方法
iphone拍照后会有一些信息需要显示在图片上,上传或是打印,就是所谓的水印那样,可以通过下面的代码实现:
//image是你要增加水印的底图
UIGraphicsBeginImageContext(image.size);
CGContextRef context = UIGraphicsGetCurrentContext();
//设置水印颜色
[[UIColor whiteColor] set];
[title drawInRect:CGRectMake((image.size.width-[title sizeWithFont:font].width)/2+8, -30+(30-[title sizeWithFont:font].height)/2, 100, 30) withFont:font];
//获得加好水印的图片
result = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
iPhone 应用程序开发
iOS程序员 --------------------编程问答-------------------- 谢谢分享。 --------------------编程问答-------------------- --------------------编程问答-------------------- 谢谢分享 --------------------编程问答-------------------- 感谢分享啊! --------------------编程问答-------------------- 你好,在我的工程中正好用到,太好了,一定要顶! --------------------编程问答-------------------- 不错。。。顶啊 --------------------编程问答-------------------- 这个必须mark --------------------编程问答-------------------- 谢谢楼主,楼主值得表扬 --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答--------------------
补充:移动开发 , iPhone