图像的色相效果-iOS [英] Hue effect for Image - iOS

查看:53
本文介绍了图像的色相效果-iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道是否有可能对Image进行色调效果,但不使用OpenGl ES,最好使用CALayer.我已经花了一些时间寻找答案,但还是没有.

I just wonder, if there is any possibility to make an hue effect for Image, but not using OpenGl ES, preferably using CALayer. I have spent some time looking for an answer, but still nothing.

tnx

推荐答案

您可以尝试将原始图像的可见部分复制到RGB位图,然后在进行一些线性颜色空间变换的情况下,编写Neon ASM以重新计算每个像素的RGB.Accelerate DSP框架中的某些内容也可能适用.然后使用修改后的位图图像更新CALayer的内容.对于合理大小的图像部分,可能足够快以获得适当的帧速率.如果滑块不动一会儿,请同时更新图像的其余部分.

You could try copying the visible portion of the original image to an RGB bitmap, and writing Neon ASM to recalculate each pixel's RGB given some linear color space transform. Something in the Accelerate DSP framework might also be suitable. Then update the CALayer's contents with the modified bitmap image. Might be fast enough for a decent frame rate for a reasonable sized portion of the image. If the slider doesn't move for a bit, update the rest of the image as well.

这篇关于图像的色相效果-iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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