【iPhone Development】对图片加入特定水印的方法
2011-08-01 18:07
441 查看
对图片加入特定水印的方法
iphone拍照后会有一些信息需要显示在图片上,上传或是打印,就是所谓的水印那样,可以通过下面的代码实现:
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相册中图片的方法(包括获取所有图片)
- 转载(忘记出处)给图片加水印的方法
- php GD库的简单封装,图片压缩、文字水印、图片水印等方法
- asp.net通过实现IHttpHandler接口方法给图片添加水印图片(动态添加,不破坏原图片,但是耗资源)
- .net 加水印 图片变大很多 解决方法
- 程序为图片加水印的方法
- asp.net下用Aspose.Words for .NET动态生成word文档中的图片或水印的方法(转)
- asp .net 为图片添加文字水印(内包含有加图片水印的方法,但尚未完善暂不能使用)
- FCK在线编辑器上传图片加入水印功能
- 图片圆角iPhone development – UIImage with round corners
- php给图片加入文字水印
- iPhone上读取图片数据的方法
- ios 给图片上加水印的方法
- iphone图片拉伸的几种方法
- 获取IPhone相册中照片的方法(包含获取所有图片)
- 用asp水印图片代码和方法
- iPhone设置视图背景图片的方法
- [iphone][xcode]包含iphone4在内的icon,default及图片处理方法