public class LutColorFilter extends ImageFilter implements ImageFilter.FilterConfigIntensity
ImageFilter.FilterConfigIntensityAbstractConfig.AspectConfigInterface, AbstractConfig.BindData, AbstractConfig.ColorConfigInterface, AbstractConfig.ConfigViewHolder, AbstractConfig.FontConfigInterface<T>, AbstractConfig.FrameConfigInterface, AbstractConfig.ImageFilterInterface, AbstractConfig.StickerConfigInterface, AbstractConfig.ToolConfigInterface| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<LutColorFilter> |
CREATOR |
DEFAULT_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_SIZEisDirty, NO_STATIC_THUMBNAIL_ID, ORIGINAL_THUMBNAIL_SIZE, thumbnailUri| Modifier | Constructor and Description |
|---|---|
|
LutColorFilter(int name,
int thumbnailRes,
int lutResource) |
protected |
LutColorFilter(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
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
|
int |
hashCode() |
boolean |
hasResourceLut() |
boolean |
hasStaticThumbnail()
Check if it has a static thumbnail drawable.
|
void |
onDraw() |
void |
release()
Release the shader program and texture
|
void |
renderImage(Allocation allocationIn,
Allocation allocationOut,
float intensity,
boolean previewMode) |
Allocation |
renderImage(Allocation allocationIn,
float intensity,
boolean previewMode)
Apply the renderscript filter with a specific intensity.
|
android.graphics.Bitmap |
renderImage(android.graphics.Bitmap bitmap,
float intensity,
boolean previewMode)
Render the filter
|
protected void |
setup(int texTarget) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
createTargetShader, draw, getHandle, getLayout, hasIntensityConfig, isSelectable, releaseProgram, renderImage, useProgramcreateViewHolder, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailResId, getTitle, getVerticalLayout, isClickable, isDirty, setDirtyFlagclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreateViewHolder, generateBindData, generateBindDataAsync, getName, getVerticalLayout, isDirty, setDirtyFlagpublic static final android.os.Parcelable.Creator<LutColorFilter> CREATOR
public LutColorFilter(@StringRes
int name,
@DrawableRes
int thumbnailRes,
@DrawableRes @RawRes
int lutResource)
protected LutColorFilter(android.os.Parcel in)
@Nullable public android.graphics.Bitmap getThumbnailBitmap(int maxWidth)
AbstractConfiggetThumbnailBitmap in class ImageFiltermaxWidth - Size the drawable should be limited to.public void onDraw()
onDraw in class ImageFilter@Nullable
public android.graphics.Bitmap renderImage(@Nullable
android.graphics.Bitmap bitmap,
float intensity,
boolean previewMode)
renderImage in interface ImageFilter.FilterConfigIntensityrenderImage in interface AbstractConfig.ImageFilterInterfacerenderImage in class ImageFilterbitmap - sourceintensity - filter intensitypreviewMode - true if the renderer can reduce the quality to improve speed.@Nullable
public Allocation renderImage(Allocation allocationIn,
float intensity,
boolean previewMode)
AbstractConfig.ImageFilterInterfacerenderImage in interface ImageFilter.FilterConfigIntensityrenderImage in interface AbstractConfig.ImageFilterInterfacerenderImage in class ImageFilterallocationIn - the source image.intensity - the filter intensitypreviewMode - set true to render a faster previewpublic void renderImage(Allocation allocationIn,
Allocation allocationOut,
float intensity,
boolean previewMode)
public void release()
ImageFilterrelease in interface AbstractConfig.ImageFilterInterfacerelease in class ImageFilter@Nullable public android.graphics.Bitmap getLutBitmap()
public boolean hasResourceLut()
public boolean hasStaticThumbnail()
AbstractConfighasStaticThumbnail in class ImageFilterAbstractConfig.getThumbnailBitmap()@NonNull
public Allocation getLutCube(@NonNull
RenderScript rs)
rs - reference to the renderscript.protected void setup(int texTarget)
setup in class ImageFilterpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int describeContents()
describeContents in interface android.os.ParcelabledescribeContents in class ImageFilterpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.ParcelablewriteToParcel in class ImageFilter