public class LutColorFilter extends ImageFilter implements ImageFilter.FilterConfigIntensity
ImageFilter.FilterConfigIntensityAbstractConfig.AspectConfigInterface, AbstractConfig.BindData, AbstractConfig.ColorConfigInterface, AbstractConfig.ConfigViewHolder, AbstractConfig.FontConfigInterface<T>, AbstractConfig.ImageFilterInterface, AbstractConfig.StickerConfigInterface, AbstractConfig.ToolConfigInterfaceDEFAULT_ATTRIB_POSITION, DEFAULT_ATTRIB_TEXTURE_COORDINATE, DEFAULT_UNIFORM_SAMPLER, DEFAULT_VERTEX_SHADER, TARGET_PLACEHOLDER, VERTICES_DATA_POS_OFFSET, VERTICES_DATA_POS_SIZE, VERTICES_DATA_STRIDE_BYTES, VERTICES_DATA_UV_OFFSET, VERTICES_DATA_UV_SIZENO_THUMBNAIL_ID, ORIGINAL_THUMBNAIL_SIZE| Constructor and Description |
|---|
LutColorFilter(int name,
int thumbnailRes,
int lutResource) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getLutAllocationCacheName() |
android.graphics.Bitmap |
getLutBitmap()
Return the Lut as bitmap.
|
Allocation |
getLutCube(RenderScript rs)
Return the Renderscript LUT Allocation
|
android.graphics.Bitmap |
getThumbnailBitmap(int maxWidth)
Return the Thumbnail, do not call in Main Thread and use #getThumbnailResId() if #hasStaticThumbnail
|
boolean |
hasStaticThumbnail()
Check if it has a static thumbnail drawable.
|
void |
onDraw() |
void |
release()
Release the shader program and texture
|
android.graphics.Bitmap |
renderImage(android.graphics.Bitmap bitmap)
Apply the renderscript filter without intensity changes.
|
android.graphics.Bitmap |
renderImage(android.graphics.Bitmap bitmap,
float intensity)
Apply the renderscript filter with a specific intensity.
|
protected android.graphics.Bitmap |
renderIntensity(android.graphics.Bitmap source,
android.graphics.Bitmap blend,
float intensity) |
protected void |
setup(int texTarget) |
createTargetShader, draw, getHandle, getLayout, hasIntensityConfig, isSelectable, releaseProgram, useProgramcreateViewHolder, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailResId, getTitle, getVerticalLayout, isClickableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateViewHolder, generateBindData, generateBindDataAsync, getName, getVerticalLayoutpublic LutColorFilter(int name,
int thumbnailRes,
int lutResource)
public android.graphics.Bitmap getThumbnailBitmap(int maxWidth)
AbstractConfiggetThumbnailBitmap in class ImageFiltermaxWidth - Size the drawable should be limited to.public void onDraw()
onDraw in class ImageFilterpublic android.graphics.Bitmap renderImage(android.graphics.Bitmap bitmap,
float intensity)
AbstractConfig.ImageFilterInterfacerenderImage in interface AbstractConfig.ImageFilterInterfacerenderImage in interface ImageFilter.FilterConfigIntensityrenderImage in class ImageFilterbitmap - the source image.intensity - the filter intensitypublic android.graphics.Bitmap renderImage(android.graphics.Bitmap bitmap)
AbstractConfig.ImageFilterInterfacerenderImage in interface AbstractConfig.ImageFilterInterfacerenderImage in class ImageFilterbitmap - the source image.public void release()
ImageFilterrelease in interface AbstractConfig.ImageFilterInterfacerelease in class ImageFilterpublic android.graphics.Bitmap getLutBitmap()
public boolean hasStaticThumbnail()
AbstractConfighasStaticThumbnail in class ImageFilterAbstractConfig.getThumbnailBitmap()protected java.lang.String getLutAllocationCacheName()
public Allocation getLutCube(RenderScript rs)
rs - reference to the renderscript.protected void setup(int texTarget)
setup in class ImageFilterprotected android.graphics.Bitmap renderIntensity(android.graphics.Bitmap source,
android.graphics.Bitmap blend,
float intensity)