-
public interface PostprocessorUse an instance of this class to perform post-process operations on a bitmap.
-
-
Method Summary
Modifier and Type Method Description abstract CloseableReference<Bitmap>process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory)Called by the pipeline after completing other steps. abstract StringgetName()Returns the name of this postprocessor. abstract CacheKeygetPostprocessorCacheKey()Implement this method in order to cache the result of a postprocessor in the bitmap cache alongwith the unmodified image. -
-
Method Detail
-
process
abstract CloseableReference<Bitmap> process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory)
Called by the pipeline after completing other steps.
- Parameters:
sourceBitmap- The source bitmap.bitmapFactory- The factory to create a destination bitmap.
-
getName
abstract String getName()
Returns the name of this postprocessor.
Used for logging and analytics.
-
getPostprocessorCacheKey
@Nullable() abstract CacheKey getPostprocessorCacheKey()
Implement this method in order to cache the result of a postprocessor in the bitmap cache alongwith the unmodified image.
When reading from memory cache, there will be a hit only if the cache's value for this keymatches that of the request.
Each postprocessor class is only allowed one entry in the cache. When writing tomemory cache, this key is not considered and any image for this request with the samepostprocessor class will be overwritten.
-
-
-
-