public class RedactableImage extends Object implements IImageFormatInstance, IMultipleAreaRedactable
Provides facade to all raster image redaction operations.
Constructor and Description |
---|
RedactableImage(IImageFormatInstance img)
Creates a new instace using an object, implementing
IImageFormatInstance interface. |
RedactableImage(IMultipleAreaRedactable img)
Creates a new instace using an object, implementing
IMultipleAreaRedactable interface. |
Modifier and Type | Method and Description |
---|---|
RedactionResult |
editArea(Point topLeft,
RegionReplacementOptions options)
Replaces the area at given point with a rectangle of specific color and size.
|
RedactionResult |
editAreas(Rectangle[] rectangles,
Color boxColor)
Redacts multiple image areas at once with the same color.
|
InputStream |
getRawStream()
Retrieves a stream with actual image content.
|
public RedactableImage(IImageFormatInstance img)
Creates a new instace using an object, implementing IImageFormatInstance
interface.
img
- An instance, implementing IImageFormatInstance interfacepublic RedactableImage(IMultipleAreaRedactable img)
Creates a new instace using an object, implementing IMultipleAreaRedactable
interface.
img
- An instance, implementing IMultipleAreaRedactable interfacepublic final InputStream getRawStream()
Retrieves a stream with actual image content.
getRawStream
in interface IMultipleAreaRedactable
public final RedactionResult editAreas(Rectangle[] rectangles, Color boxColor)
Redacts multiple image areas at once with the same color.
editAreas
in interface IMultipleAreaRedactable
rectangles
- An array of rectangle areasboxColor
- Color to fill the areaspublic final RedactionResult editArea(Point topLeft, RegionReplacementOptions options)
Replaces the area at given point with a rectangle of specific color and size.
editArea
in interface IImageFormatInstance
topLeft
- Top-left corner coordinates of filled areaoptions
- Color and size settingsCopyright © 2021. All rights reserved.