Class ImageSaveOptions
- java.lang.Object
-
- com.aspose.tasks.SaveOptions
-
- com.aspose.tasks.ImageSaveOptions
-
public class ImageSaveOptions extends SaveOptions
Allows to specify additional options when rendering project pages to images.
-
-
Constructor Summary
Constructors Constructor Description ImageSaveOptions(int saveFormat)Initializes a new instance of theImageSaveOptionsclass which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcopyOutputPropertiesFrom(SaveOptions source)SaveOptionsdeepClone()StringgetDefaultFontName()Gets the default font for rendering.floatgetHorizontalResolution()Gets the horizontal resolution in dpi.intgetJpegQuality()Gets a JPEG quality.List<Integer>getPages()Gets a list of page numbers to save when saving project layout to separate files.IPageSavingCallbackgetPageSavingCallback()Gets a user-defined callback which is used to get an output stream for each rendered page.intgetPixelFormat()Gets the format of the color data for each pixel in the image.booleangetReduceFooterGap()Gets a value indicating whether a gap between last task and the footer must be reduced.booleangetSaveToSeparateFiles()Deprecated.This property is obsolete and will be removed after the release 21.08.intgetTiffCompression()Gets the type of compression to apply when saving generated images to the TIFF format.booleangetUseProjectDefaultFont()Gets a value indicating whether the default font must be used for rendering.floatgetVerticalResolution()Gets the vertical resolution in dpi.voidsetDefaultFontName(String value)Sets the default font for rendering.voidsetHorizontalResolution(float value)Sets the horizontal resolution in dpi.voidsetJpegQuality(int value)Sets a JPEG quality.voidsetPages(List<Integer> value)Sets a list of page numbers to save when saving project layout to separate files.voidsetPageSavingCallback(IPageSavingCallback value)Sets a user-defined callback which is used to get an output stream for each rendered page.voidsetPixelFormat(int value)Sets the format of the color data for each pixel in the image.voidsetReduceFooterGap(boolean value)Sets a value indicating whether a gap between last task and the footer must be reduced.voidsetSaveToSeparateFiles(boolean value)Deprecated.This property is obsolete and will be removed after the release 21.08.voidsetTiffCompression(int value)Sets the type of compression to apply when saving generated images to the TIFF format.voidsetUseProjectDefaultFont(boolean value)Sets a value indicating whether the default font must be used for rendering.voidsetVerticalResolution(float value)Sets the vertical resolution in dpi.-
Methods inherited from class com.aspose.tasks.SaveOptions
getBarStyles, getCustomPageSize, getDrawNonWorkingTime, getEndDate, getFitContent, getGridlines, getLegendOnEachPage, getMarkCriticalTasks, getNonWorkingTimeColor, getPageCount, getPageSize, getPresentationFormat, getRenderToSinglePage, getRollUpGanttBars, getSaveFormat, getStartDate, getTasksComparer, getTasksFilter, getTextStyles, getTimescale, getUseGradientBrush, getView, getViewSettings, setBarStyles, setCustomPageSize, setDrawNonWorkingTime, setEndDate, setFitContent, setGridlines, setLegendOnEachPage, setMarkCriticalTasks, setNonWorkingTimeColor, setPageSize, setPresentationFormat, setRenderToSinglePage, setRollUpGanttBars, setStartDate, setTasksComparer, setTasksFilter, setTextStyles, setTimescale, setUseGradientBrush, setView, setViewSettings
-
-
-
-
Constructor Detail
-
ImageSaveOptions
public ImageSaveOptions(int saveFormat)
Initializes a new instance of the
ImageSaveOptionsclass which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.- Parameters:
saveFormat- Can be TIFF, PNG, BMP or JPEGSaveFileFormat.- Throws:
com.aspose.ms.System.ArgumentException- Thrown ofsaveFormatis not a valid image format. The valid values are TIFF, PNG, BMP or JPEG.
-
-
Method Detail
-
copyOutputPropertiesFrom
public final void copyOutputPropertiesFrom(SaveOptions source)
- Parameters:
source-
-
deepClone
public SaveOptions deepClone()
- Returns:
-
getDefaultFontName
public final String getDefaultFontName()
Gets the default font for rendering.
- Returns:
- the default font for rendering.
-
setDefaultFontName
public final void setDefaultFontName(String value)
Sets the default font for rendering.
- Parameters:
value- the default font for rendering.
-
getHorizontalResolution
public final float getHorizontalResolution()
Gets the horizontal resolution in dpi.
- Returns:
- the horizontal resolution in dpi.
-
setHorizontalResolution
public final void setHorizontalResolution(float value)
Sets the horizontal resolution in dpi.
- Parameters:
value- the horizontal resolution in dpi.
-
getJpegQuality
public final int getJpegQuality()
Gets a JPEG quality.
- Returns:
- a JPEG quality.
-
setJpegQuality
public final void setJpegQuality(int value)
Sets a JPEG quality.
- Parameters:
value- 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. Is applicable when
SaveToSeparateFiles(getSaveToSeparateFiles()/setSaveToSeparateFiles(boolean)) option is used.- Returns:
- a user-defined callback which is used to get an output stream for each rendered page.
-
setPageSavingCallback
public final void setPageSavingCallback(IPageSavingCallback value)
Sets a user-defined callback which is used to get an output stream for each rendered page. Is applicable when
SaveToSeparateFiles(getSaveToSeparateFiles()/setSaveToSeparateFiles(boolean)) option is used.- Parameters:
value- 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:
- a list of page numbers to save when saving project layout to separate files.
-
setPages
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:
value- 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:
- the format of the color data for each pixel in the image.
-
setPixelFormat
public final void setPixelFormat(int value)
Sets the format of the color data for each pixel in the image.
- Parameters:
value- 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:
- a value indicating whether a gap between last task and the footer must be reduced.
-
setReduceFooterGap
public final void setReduceFooterGap(boolean value)
Sets a value indicating whether a gap between last task and the footer must be reduced.
- Parameters:
value- a value indicating whether a gap between last task and the footer must be reduced.
-
getSaveToSeparateFiles
@Deprecated public final boolean getSaveToSeparateFiles()
Deprecated.This property is obsolete and will be removed after the release 21.08. Please use SaveOptions.RenderToSinglePage property instead.Gets a value indicating whether to save project pages to separate files.
- Returns:
- a value indicating whether to save project pages to separate files.
-
setSaveToSeparateFiles
@Deprecated public final void setSaveToSeparateFiles(boolean value)
Deprecated.This property is obsolete and will be removed after the release 21.08. Please use SaveOptions.RenderToSinglePage property instead.Sets a value indicating whether to save project pages to separate files.
- Parameters:
value- a value indicating whether to save project pages to separate files.
-
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 isTiffCompressionLZW(getTiffCompression()/setTiffCompression(int)).- Returns:
- the type of compression to apply when saving generated images to the TIFF format.
-
setTiffCompression
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 isTiffCompressionLZW(getTiffCompression()/setTiffCompression(int)).- Parameters:
value- the type of compression to apply when saving generated images to the TIFF format.
-
getUseProjectDefaultFont
public final boolean getUseProjectDefaultFont()
Gets a value indicating whether the default font must be used for rendering.
- Returns:
- a value indicating whether the default font must be used for rendering.
-
setUseProjectDefaultFont
public final void setUseProjectDefaultFont(boolean value)
Sets a value indicating whether the default font must be used for rendering.
- Parameters:
value- a value indicating whether the default font must be used for rendering.
-
getVerticalResolution
public final float getVerticalResolution()
Gets the vertical resolution in dpi.
- Returns:
- the vertical resolution in dpi.
-
setVerticalResolution
public final void setVerticalResolution(float value)
Sets the vertical resolution in dpi.
- Parameters:
value- the vertical resolution in dpi.
-
-