Created
December 8, 2015 14:36
-
-
Save wangyung/d9f1d8a26137f6229ed1 to your computer and use it in GitHub Desktop.
Renderscript for blur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RenderScript rs = RenderScript.create(theActivity); | |
ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur.create(mRS, Element.U8_4(rs));; | |
Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap); | |
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap); | |
theIntrinsic.setRadius(25.f); | |
theIntrinsic.setInput(tmpIn); | |
theIntrinsic.forEach(tmpOut); | |
tmpOut.copyTo(outputBitmap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment