Professional Documents
Culture Documents
BeautyEffect;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
//import android.renderscript.Allocation;
//import android.renderscript.Element;
//import android.renderscript.RenderScript;
//import android.renderscript.ScriptIntrinsic3DLUT;
//import android.renderscript.Type;
import android.support.v8.renderscript.*;
import android.util.Log;
@SuppressLint("NewApi")
public class RenderScriptLutColorFilter {
scriptLut.forEach(mAllocIn, mAllocOut);
mAllocOut.copyTo(resultImage);
// if (intensity != 1) {
// outputBitmap = renderIntensity(bitmap, outputBitmap,
intensity);
// }
return resultImage;
lutBitmap.getPixels(pixels, 0, w, 0, 0, w, h);
try {
mAllocCube.copyFromUnchecked(lut);
} catch (Exception e) {
return mAllocCube;
}
return script;
}