project.android.imageprocessing.filter.colour
Class LookupFilter

java.lang.Object
  extended by project.android.imageprocessing.GLRenderer
      extended by project.android.imageprocessing.input.GLTextureOutputRenderer
          extended by project.android.imageprocessing.filter.BasicFilter
              extended by project.android.imageprocessing.filter.MultiInputFilter
                  extended by project.android.imageprocessing.filter.colour.LookupFilter
All Implemented Interfaces:
GLTextureInputRenderer
Direct Known Subclasses:
AmatorkaFilter, MissEtikateFilter, MosaicFilter

public class LookupFilter
extends MultiInputFilter

Uses an RGB color lookup image to remap the colors in an image. First, use your favourite photo editing application to apply a filter to lookup.png from AndroidFastImageProcessing/res/drawable. For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work). If you need a more complex filter you can create as many lookup tables as required. Once ready, use your new lookup.png file as the resource input for LookupFilter.

Author:
Chris Batt

Field Summary
 
Fields inherited from class project.android.imageprocessing.GLRenderer
ATTRIBUTE_POSITION, ATTRIBUTE_TEXCOORD, UNIFORM_TEXTURE0, VARYING_TEXCOORD
 
Constructor Summary
LookupFilter(android.content.Context context, int id)
           
 
Method Summary
 void destroy()
          Cleans up the opengl objects for this renderer.
 void newTextureReady(int texture, GLTextureOutputRenderer source)
          Signals that a new texture is available and the image should be reprocessed.
 
Methods inherited from class project.android.imageprocessing.filter.MultiInputFilter
clearRegisteredFilterLocations, registerFilterLocation, registerFilterLocation
 
Methods inherited from class project.android.imageprocessing.input.GLTextureOutputRenderer
addTarget, getLockObject, getTargets, removeTarget
 
Methods inherited from class project.android.imageprocessing.GLRenderer
getBackgroundAlpha, getBackgroundBlue, getBackgroundGreen, getBackgroundRed, getHeight, getWidth, onDrawFrame, reInitialize, rotateClockwise90Degrees, rotateCounterClockwise90Degrees, setBackgroundAlpha, setBackgroundBlue, setBackgroundColour, setBackgroundGreen, setBackgroundRed, setRenderSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupFilter

public LookupFilter(android.content.Context context,
                    int id)
Method Detail

destroy

public void destroy()
Description copied from class: GLRenderer
Cleans up the opengl objects for this renderer. Must be called with opengl context. Normally called by FastImageProcessingPipeline.

Overrides:
destroy in class GLTextureOutputRenderer

newTextureReady

public void newTextureReady(int texture,
                            GLTextureOutputRenderer source)
Description copied from interface: GLTextureInputRenderer
Signals that a new texture is available and the image should be reprocessed.

Specified by:
newTextureReady in interface GLTextureInputRenderer
Overrides:
newTextureReady in class MultiInputFilter
Parameters:
texture - The texture id to be used as input.
source - The GLTextureOutputRenderer which produced the texture.