iPhone:如何更改图像的颜色 [英] iPhone: How to change the color of an image

查看:173
本文介绍了iPhone:如何更改图像的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个来自数据库的小图片,图片的平均颜色需要稍加修改。

I have a small image from a database and the image's average color need to be altered slightly.

这是一个 CGImageRef 创建 CGContext ,将图像绘制到此上下文,然后随后以某种方式更改位图数据并最终呈现它。
但是如何更改颜色信息?

It's a CGImageRef and I thought of creating a CGContext, drawing the image to this context, then subsequently changing the bitmap data somehow and finally rendering it. But how can I alter the color information?

感谢您的帮助!

推荐答案

查看这个Apple Q& A对像素数据操作有关如何处理的详细信息。

Check out this Apple Q&A on pixel data manipulation for details on how you might go about that.

这篇关于iPhone:如何更改图像的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆