英文:
How to edit hue saturation and luminance by using GPUImageFilters in android Java?
问题
我想使用OpenGLES或GPUImageFilter调整图像中特定颜色阴影的色调、饱和度和亮度
。基本上应该是这样的:
英文:
I want to ajust the hue, saturation and luminace
of an image for specific color shades
using OpenGLES or GPUImageFilter.
答案1
得分: 1
似乎这个库中没有内置的功能来实现这个。因此,你可以通过扩展 GPUImageFilter
并编写相应的着色器来自行实现。
你可以重用现有的色相、饱和度和亮度滤镜。
思路很简单 - 你要向着色器传递一个额外的参数(颜色)。基于这个颜色和当前像素的颜色,你可以选择是否让当前像素受着色器影响。
英文:
Seems like there's no built-in functionality for it in this library. So, you can implement it yourself by extending GPUImageFilter
and writing a corresponding shader.
You can reuse existing Hue, Saturation, and Luminance filters.
The idea is simple - you're passing an additional parameter (color) to the shader. Based on this color and the color of the current pixel, you can choose if the current pixel should be affected by the shader or not.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论