ImageContent
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.watermark.contents.ContentPart, com.groupdocs.watermark.contents.Content
public class ImageContent extends Content
Represents an image where a watermark can be placed.
Learn more:
| Constructor | Description |
|---|---|
| ImageContent(StreamContainer stream, StrategyManager |
| Method | Description |
|---|---|
| getHeight() | Gets the height of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels. |
| getWidth() | Gets the width of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels. |
| getAsposeImageContainer() | Gets underlying GroupDocs.Watermark.Internal.AsposeImageContainer . |
| getDocumentInfo() | |
| getFileType() | |
| performSave(String filePath) | |
| performSave(String filePath, SaveOptions saveOptions) | |
| performSave(OutputStream stream) | Saves the content to the specified stream. |
| performSave(OutputStream stream, SaveOptions saveOptions) | Saves the content to the specified stream. |
| add(Watermark watermark, WatermarkOptions options) | |
| generatePreview(PreviewOptions previewOptions) |
ImageContent(StreamContainer stream, StrategyManager strategyManager, FileType fileType, ImageLoadOptions imageLoadOptions, WatermarkerSettings watermarkerSettings)
public ImageContent(StreamContainer stream, StrategyManager<Integer> strategyManager, FileType fileType, ImageLoadOptions imageLoadOptions, WatermarkerSettings watermarkerSettings)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | StreamContainer | |
| strategyManager | com.groupdocs.watermark.internal.StrategyManager<java.lang.Integer> | |
| fileType | FileType | |
| imageLoadOptions | ImageLoadOptions | |
| watermarkerSettings | WatermarkerSettings |
public final int getHeight()
Gets the height of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels.
Returns the height of the active frame for a multiframe image.
Returns:
int - The height of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels.
public final int getWidth()
Gets the width of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels.
Returns the width of the active frame for a multiframe image.
Returns:
int - The width of this [ImageContent](../../com.groupdocs.watermark.contents/imagecontent) in pixels.
public final AsposeImageContainer getAsposeImageContainer()
Gets underlying GroupDocs.Watermark.Internal.AsposeImageContainer .
Returns: AsposeImageContainer
public IDocumentInfo getDocumentInfo()
Returns: IDocumentInfo
public FileType getFileType()
Returns: FileType
public void performSave(String filePath)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filePath | java.lang.String |
public void performSave(String filePath, SaveOptions saveOptions)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filePath | java.lang.String | |
| saveOptions | SaveOptions |
public void performSave(OutputStream stream)
Saves the content to the specified stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream |
public void performSave(OutputStream stream, SaveOptions saveOptions)
Saves the content to the specified stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream | The stream to save the content data to. |
| saveOptions | SaveOptions | The options tha should be used when saving the content data. |
public void add(Watermark watermark, WatermarkOptions options)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| watermark | Watermark | |
| options | WatermarkOptions |
public void generatePreview(PreviewOptions previewOptions)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| previewOptions | PreviewOptions |
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.