//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();
对图片加入特定水印的方法
最新推荐文章于 2024-02-25 20:58:57 发布