RedactableImage

Inheritance: java.lang.Object

All Implemented Interfaces: com.groupdocs.redaction.integration.IImageFormatInstance, com.groupdocs.redaction.integration.IMultipleAreaRedactable

public class RedactableImage implements IImageFormatInstance, IMultipleAreaRedactable

Provides facade to all raster image redaction operations.

Constructors

Constructor 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.

Methods

Method Description
getRawStream() Retrieves a stream with actual image content.
editAreas(Rectangle[] rectangles, Color boxColor) Redacts multiple image areas at once with the same color.
editArea(Point topLeft, RegionReplacementOptions options) Replaces the area at given point with a rectangle of specific color and size.

RedactableImage(IImageFormatInstance img)

public RedactableImage(IImageFormatInstance img)

Creates a new instace using an object, implementing IImageFormatInstance interface.

Parameters:

Parameter Type Description
img IImageFormatInstance An instance, implementing IImageFormatInstance interface

RedactableImage(IMultipleAreaRedactable img)

public RedactableImage(IMultipleAreaRedactable img)

Creates a new instace using an object, implementing IMultipleAreaRedactable interface.

Parameters:

Parameter Type Description
img IMultipleAreaRedactable An instance, implementing IMultipleAreaRedactable interface

getRawStream()

public final InputStream getRawStream()

Retrieves a stream with actual image content.

Returns: java.io.InputStream - Stream, containing image data

editAreas(Rectangle[] rectangles, Color boxColor)

public final RedactionResult editAreas(Rectangle[] rectangles, Color boxColor)

Redacts multiple image areas at once with the same color.

Parameters:

Parameter Type Description
rectangles java.awt.Rectangle[] An array of rectangle areas
boxColor java.awt.Color Color to fill the areas

Returns: RedactionResult - Image areas redaction result

editArea(Point topLeft, RegionReplacementOptions options)

public final RedactionResult editArea(Point topLeft, RegionReplacementOptions options)

Replaces the area at given point with a rectangle of specific color and size.

Parameters:

Parameter Type Description
topLeft java.awt.Point Top-left corner coordinates of filled area
options RegionReplacementOptions Color and size settings

Returns: RedactionResult - Image area redaction result