RedactableImage
Leave feedback
On this page
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.
| 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. |
| 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. |
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 |
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 |
public final InputStream getRawStream()
Retrieves a stream with actual image content.
Returns: java.io.InputStream - Stream, containing image data
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
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
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.