ImageContent
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:
Constructors
Constructor | Description |
---|---|
ImageContent(StreamContainer stream, StrategyManager |
Methods
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. |
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 |
getHeight()
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.
getWidth()
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.
getDocumentInfo()
public IDocumentInfo getDocumentInfo()
Returns: IDocumentInfo
getFileType()
public FileType getFileType()
Returns: FileType
performSave(String filePath)
public void performSave(String filePath)
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String |
performSave(String filePath, SaveOptions saveOptions)
public void performSave(String filePath, SaveOptions saveOptions)
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | |
saveOptions | SaveOptions |
performSave(OutputStream stream)
public void performSave(OutputStream stream)
Saves the content to the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream |
performSave(OutputStream stream, SaveOptions saveOptions)
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. |
add(Watermark watermark, WatermarkOptions options)
public void add(Watermark watermark, WatermarkOptions options)
Parameters:
Parameter | Type | Description |
---|---|---|
watermark | Watermark | |
options | WatermarkOptions |
generatePreview(PreviewOptions previewOptions)
public void generatePreview(PreviewOptions previewOptions)
Parameters:
Parameter | Type | Description |
---|---|---|
previewOptions | PreviewOptions |