Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit hue saturation and luminance by using GPUImageFilters in android Java?

I want to ajust the hue, saturation and luminace of an image for specific color shades using OpenGLES or GPUImageFilter.

It should basically like this enter image description here

like image 746
ps_who Avatar asked Nov 06 '22 04:11

ps_who


1 Answers

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.

like image 181
Konstantin Raspopov Avatar answered Nov 09 '22 07:11

Konstantin Raspopov