cats-oss / android-gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)
8.94k stars 2.26k forks source link

LUT Filters Issue #332

Open supriya456 opened 7 years ago

supriya456 commented 7 years ago

Hello,

Can you please help me how can i add lut filters to this type of lut files because its always showing boxes while adding filter?

Please check this lut reference image https://i.stack.imgur.com/o2d3y.png

mohitpant9 commented 7 years ago

you have to add this class

RenderScriptLutColorFilter.txt

1>Then their is a method in that class,it takes two argument 1st your original Image and second lut filter image 2>int[] lutArray = {R.mipmap.ic_launcher, R.drawable.beauty_filter_4, R.drawable.beauty_filter_5, R.drawable.beauty_filter_8, R.drawable.beauty_filter_10, R.drawable.beauty_filter_12, R.drawable.beauty_filter_13, R.drawable.beauty_filter_16, R.drawable.beauty_filter_17, R.drawable.cre_lut_chest, R.drawable.cre_lut_cottoncandy, R.drawable.cre_lut_creamy, R.drawable.cre_lut_colorful, R.drawable.cre_lut_fall, R.drawable.cre_lut_food, R.drawable.cre_lut_highcarb, R.drawable.cre_lut_k1, R.drawable.cre_lut_kdynamic, R.drawable.cre_lut_lenin, R.drawable.cre_lut_pro400, R.drawable.cre_lut_soft, R.drawable.cre_lut_summer};

3>amb = rs_color_filter.renderImage(originalBitmap.copy(Bitmap.Config.ARGB_8888, true), lut); mClickedImage.setImageBitmap(amb);

 if u still find any issue plz tell, i will try to help