ImageSaveOptions

Inheritance: java.lang.Object, com.aspose.tasks.SimpleSaveOptions, com.aspose.tasks.SaveOptions

All Implemented Interfaces: com.aspose.tasks.SaveOptions.IReduceBottomGap, com.aspose.tasks.SaveOptions.IFontCallbacks, com.aspose.tasks.ICloneableSaveOptions

public class ImageSaveOptions extends SaveOptions implements SaveOptions.IReduceBottomGap, SaveOptions.IFontCallbacks, ICloneableSaveOptions

Allows to specify additional options when rendering project pages to images.

Constructors

ConstructorDescription
ImageSaveOptions(int saveFormat)Initializes a new instance of the ImageSaveOptions class which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.

Methods

MethodDescription
copyOutputPropertiesFrom(SaveOptions source){@inheritDoc}
deepClone(){@inheritDoc}
getFontSettings()Specifies font settings used when rendering project’s view.
getHorizontalResolution()Gets the horizontal resolution in dpi.
getJpegQuality()Gets a JPEG quality.
getPageSavingCallback()Gets a user-defined callback which is used to get an output stream for each rendered page.
getPages()Gets a list of page numbers to save when saving project layout to separate files.
getPixelFormat()Gets the format of the color data for each pixel in the image.
getReduceFooterGap()Gets a value indicating whether a gap between last task and the footer must be reduced.
getTiffCompression()Gets the type of compression to apply when saving generated images to the TIFF format.
getVerticalResolution()Gets the vertical resolution in dpi.
setHorizontalResolution(float value)Sets the horizontal resolution in dpi.
setJpegQuality(int value)Sets a JPEG quality.
setPageSavingCallback(IPageSavingCallback value)Sets a user-defined callback which is used to get an output stream for each rendered page.
setPages(List<Integer> value)Sets a list of page numbers to save when saving project layout to separate files.
setPixelFormat(int value)Sets the format of the color data for each pixel in the image.
setReduceFooterGap(boolean value)Sets a value indicating whether a gap between last task and the footer must be reduced.
setTiffCompression(int value)Sets the type of compression to apply when saving generated images to the TIFF format.
setVerticalResolution(float value)Sets the vertical resolution in dpi.

ImageSaveOptions(int saveFormat)

public ImageSaveOptions(int saveFormat)

Initializes a new instance of the ImageSaveOptions class which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.

Parameters:

ParameterTypeDescription
saveFormatintCan be TIFF, PNG, BMP or JPEGSaveFileFormat.

copyOutputPropertiesFrom(SaveOptions source)

public final void copyOutputPropertiesFrom(SaveOptions source)

Reserved for internal usage.

Parameters:

ParameterTypeDescription
sourceSaveOptions{@inheritDoc}

deepClone()

public SaveOptions deepClone()

Reserved for internal usage.

Returns: SaveOptions - {@inheritDoc}

getFontSettings()

public final FontSettings getFontSettings()

Specifies font settings used when rendering project’s view.

Returns: FontSettings - font settings.

getHorizontalResolution()

public final float getHorizontalResolution()

Gets the horizontal resolution in dpi.

Returns: float - the horizontal resolution in dpi.

getJpegQuality()

public final int getJpegQuality()

Gets a JPEG quality. The allowed value range is 0..100.

Returns: int - a JPEG quality.

getPageSavingCallback()

public final IPageSavingCallback getPageSavingCallback()

Gets a user-defined callback which is used to get an output stream for each rendered page.

Returns: IPageSavingCallback - a user-defined callback which is used to get an output stream for each rendered page.

getPages()

public final List<Integer> getPages()

Gets a list of page numbers to save when saving project layout to separate files.


All pages will be saved if this list is empty.

Returns: java.util.List<java.lang.Integer> - a list of page numbers to save when saving project layout to separate files.

getPixelFormat()

public final int getPixelFormat()

Gets the format of the color data for each pixel in the image.

Returns: int - the format of the color data for each pixel in the image.

getReduceFooterGap()

public final boolean getReduceFooterGap()

Gets a value indicating whether a gap between last task and the footer must be reduced.

Returns: boolean - a value indicating whether a gap between last task and the footer must be reduced.

getTiffCompression()

public final int getTiffCompression()

Gets the type of compression to apply when saving generated images to the TIFF format.


Has effect only when saving to TIFF. The default value is TiffCompressionLZW(getTiffCompression()/setTiffCompression(int)).

Returns: int - the type of compression to apply when saving generated images to the TIFF format.

getVerticalResolution()

public final float getVerticalResolution()

Gets the vertical resolution in dpi.

Returns: float - the vertical resolution in dpi.

setHorizontalResolution(float value)

public final void setHorizontalResolution(float value)

Sets the horizontal resolution in dpi.

Parameters:

ParameterTypeDescription
valuefloatthe horizontal resolution in dpi.

setJpegQuality(int value)

public final void setJpegQuality(int value)

Sets a JPEG quality. The allowed value range is 0..100.

Parameters:

ParameterTypeDescription
valueinta JPEG quality.

setPageSavingCallback(IPageSavingCallback value)

public final void setPageSavingCallback(IPageSavingCallback value)

Sets a user-defined callback which is used to get an output stream for each rendered page.

Parameters:

ParameterTypeDescription
valueIPageSavingCallbacka user-defined callback which is used to get an output stream for each rendered page.

setPages(List<Integer> value)

public final void setPages(List<Integer> value)

Sets a list of page numbers to save when saving project layout to separate files.


All pages will be saved if this list is empty.

Parameters:

ParameterTypeDescription
valuejava.util.List<java.lang.Integer>a list of page numbers to save when saving project layout to separate files.

setPixelFormat(int value)

public final void setPixelFormat(int value)

Sets the format of the color data for each pixel in the image.

Parameters:

ParameterTypeDescription
valueintthe format of the color data for each pixel in the image.

setReduceFooterGap(boolean value)

public final void setReduceFooterGap(boolean value)

Sets a value indicating whether a gap between last task and the footer must be reduced.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether a gap between last task and the footer must be reduced.

setTiffCompression(int value)

public final void setTiffCompression(int value)

Sets the type of compression to apply when saving generated images to the TIFF format.


Has effect only when saving to TIFF. The default value is TiffCompressionLZW(getTiffCompression()/setTiffCompression(int)).

Parameters:

ParameterTypeDescription
valueintthe type of compression to apply when saving generated images to the TIFF format.

setVerticalResolution(float value)

public final void setVerticalResolution(float value)

Sets the vertical resolution in dpi.

Parameters:

ParameterTypeDescription
valuefloatthe vertical resolution in dpi.