Class ColorizeHandler
- java.lang.Object
-
- org.apache.sling.thumbnails.internal.transformers.ColorizeHandler
-
- All Implemented Interfaces:
TransformationHandler
public class ColorizeHandler extends Object implements TransformationHandler
A transformer for resizing an image
-
-
Constructor Summary
Constructors Constructor Description ColorizeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getColor(org.apache.sling.api.resource.ValueMap properties, String name)
String
getResourceType()
Get the resource type associated with this handlervoid
handle(InputStream inputStream, OutputStream outputStream, TransformationHandlerConfig config)
Handles the transformation of the file using the command values from the suffix segment.
-
-
-
Field Detail
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
PN_RED
public static final String PN_RED
- See Also:
- Constant Field Values
-
PN_GREEN
public static final String PN_GREEN
- See Also:
- Constant Field Values
-
PN_BLUE
public static final String PN_BLUE
- See Also:
- Constant Field Values
-
PN_ALPHA
public static final String PN_ALPHA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceType
public String getResourceType()
Description copied from interface:TransformationHandler
Get the resource type associated with this handler- Specified by:
getResourceType
in interfaceTransformationHandler
- Returns:
- the handler resource type
-
handle
public void handle(InputStream inputStream, OutputStream outputStream, TransformationHandlerConfig config) throws IOException
Description copied from interface:TransformationHandler
Handles the transformation of the file using the command values from the suffix segment.- Specified by:
handle
in interfaceTransformationHandler
- Parameters:
inputStream
- the inputstream from which to read the file to transform fromoutputStream
- the outputstream to write the transformed file toconfig
- the configuration values for the transformation- Throws:
IOException
- an exception occurs transforming the file
-
getColor
protected int getColor(org.apache.sling.api.resource.ValueMap properties, String name)
-
-