com.aspose.diagram

Class ImageSaveOptions

public class ImageSaveOptions 
extends RenderingSaveOptions

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

Constructor Summary
ImageSaveOptions(intsaveFormat)
Initializes a new instance of this class that can be used to save rendered images in the SaveFileFormat, SaveFileFormat, SaveFileFormat, SaveFileFormat or SaveFileFormat format.
 
Property Getters/Setters Summary
java.awt.geom.Rectangle2D.FloatgetArea()
Gets or sets the area of the shapes will be saved .
intgetCompositingQuality()
void
           Specifies the quality level to use during compositing. The value of the property is CompositingQuality integer constant.
floatgetContentZoom()
void
setContentZoom(floatvalue)
           This parameter is similar with scale, but not effect the generated image size.
java.lang.StringgetDefaultFont()
void
setDefaultFont(java.lang.Stringvalue)
           When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally, they may appear as block in pdf, image or XPS. Set the DefaultFont such as MingLiu or MS Gothic to show these characters.
intgetEmfRenderSetting()
void
           Setting for rendering Emf metafile. The value of the property is EmfRenderSetting integer constant.
booleangetEnlargePage()
void
setEnlargePage(booleanvalue)
           Specifies whether enlarge page .
booleangetExportGuideShapes()
void
setExportGuideShapes(booleanvalue)
           Defines whether need exporting the guide shapes or not.
booleangetExportHiddenPage()
void
setExportHiddenPage(booleanvalue)
           Defines whether need exporting the hidden page or not.
floatgetImageBrightness()
void
setImageBrightness(floatvalue)
           Gets or sets the brightness for the the generated images.
intgetImageColorMode()
void
           Gets or sets the color mode for the generated images. The value of the property is ImageColorMode integer constant.
floatgetImageContrast()
void
setImageContrast(floatvalue)
           Gets or sets the contrast for the generated images.
intgetInterpolationMode()
void
           Specifies the algorithm that is used when images are scaled or rotated. The value of the property is InterpolationMode integer constant.
booleanisExportComments()
void
setExportComments(booleanvalue)
           Defines whether need exporting the comments or not.
intgetJpegQuality()
void
setJpegQuality(intvalue)
           Gets or sets a value determining the quality of the generated JPEG images.
intgetPageCount()
void
setPageCount(intvalue)
           Gets or sets the number of pages to render when saving to a multipage TIFF file. Default is MaxValue which means all pages of the diagram will be rendered.
intgetPageIndex()
void
setPageIndex(intvalue)
           Gets or sets the 0-based index of the first page to render. Default is 0.
PageSizegetPageSize()
void
           Gets or sets the page size for the generated images. Can be PageSize or null.
intgetPixelOffsetMode()
void
           Gets or set a value specifying how pixels are offset during rendering. The value of the property is PixelOffsetMode integer constant.
floatgetResolution()
void
setResolution(floatvalue)
           Gets or sets the resolution for the generated images, in dots per inch.
booleangetSameAsPdfConversionArea()
void
           Specifies whether saving area same as pdf .
booleangetSaveForegroundPagesOnly()
void
           Specifies whether all pages will be saved in image or only foreground.
intgetSaveFormat()
void
setSaveFormat(intvalue)
           Specifies the format in which the rendered diagram pages will be saved if this save options object is used. Can be SaveFileFormat, SaveFileFormat, SaveFileFormat, SaveFileFormat or SaveFileFormat. The value of the property is SaveFileFormat integer constant.
floatgetScale()
void
setScale(floatvalue)
           Gets or sets the zoom factor for the generated images.
ShapeCollectiongetShapes()
void
           Gets or sets shapes to render. Default count is 0.
intgetSmoothingMode()
void
           Specifies whether smoothing (antialiasing) is applied to lines and curves and the edges of filled areas. The value of the property is SmoothingMode integer constant.
intgetTiffCompression()
void
           Gets or sets the type of compression to apply when saving generated images to the TIFF format. The value of the property is TiffCompression integer constant.
IWarningCallbackgetWarningCallback()
void
           Gets or sets warning callback.
 

    • Property Getters/Setters Detail

      • getImageBrightness/setImageBrightness

        public float getImageBrightness() / public void setImageBrightness(float value)
        
        Gets or sets the brightness for the the generated images. This property has effect only when saving to raster image formats. The default value is 0.5. The value must be in the range between 0 and 1.
      • getImageColorMode/setImageColorMode

        public int getImageColorMode() / public void setImageColorMode(int value)
        
        Gets or sets the color mode for the generated images. The value of the property is ImageColorMode integer constant. This property has effect only when saving to raster image formats. The default value is ImageColorMode.
      • getImageContrast/setImageContrast

        public float getImageContrast() / public void setImageContrast(float value)
        
        Gets or sets the contrast for the generated images. This property has effect only when saving to raster image formats. The default value is 0.5. The value must be in the range between 0 and 1.
      • getJpegQuality/setJpegQuality

        public int getJpegQuality() / public void setJpegQuality(int value)
        
        Gets or sets a value determining the quality of the generated JPEG images. Has effect only when saving to JPEG. Use this property to get or set the quality of generated images when saving in JPEG format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression. The default value is 95.
      • getPageCount/setPageCount

        public int getPageCount() / public void setPageCount(int value)
        
        Gets or sets the number of pages to render when saving to a multipage TIFF file. Default is MaxValue which means all pages of the diagram will be rendered.
      • getPageIndex/setPageIndex

        public int getPageIndex() / public void setPageIndex(int value)
        
        Gets or sets the 0-based index of the first page to render. Default is 0.
      • getExportHiddenPage/setExportHiddenPage

        public boolean getExportHiddenPage() / public void setExportHiddenPage(boolean value)
        
        Defines whether need exporting the hidden page or not. Default value is true.
      • getResolution/setResolution

        public float getResolution() / public void setResolution(float value)
        
        Gets or sets the resolution for the generated images, in dots per inch. This property has effect only when saving to raster image formats. The default value is 96.
      • getScale/setScale

        public float getScale() / public void setScale(float value)
        
        Gets or sets the zoom factor for the generated images. The default value is 1.0. The value must be greater than 0.
      • getContentZoom/setContentZoom

        public float getContentZoom() / public void setContentZoom(float value)
        
        This parameter is similar with scale, but not effect the generated image size. The default value is 1.0. The value must be greater than 0.
      • getTiffCompression/setTiffCompression

        public int getTiffCompression() / public void setTiffCompression(int value)
        
        Gets or sets the type of compression to apply when saving generated images to the TIFF format. The value of the property is TiffCompression integer constant. Has effect only when saving to TIFF. The default value is TiffCompression.
      • getSaveForegroundPagesOnly/setSaveForegroundPagesOnly

        public boolean getSaveForegroundPagesOnly() / public void setSaveForegroundPagesOnly(boolean value)
        
        Specifies whether all pages will be saved in image or only foreground. If true - rendered only foreground pages(with background if present). If false - rendered foreground pages(with background if present) after that empty background pages. Can return true only when PageCount > 1. The default value is false.
      • getSameAsPdfConversionArea/setSameAsPdfConversionArea

        public boolean getSameAsPdfConversionArea() / public void setSameAsPdfConversionArea(boolean value)
        
        Specifies whether saving area same as pdf . If true - rendered area same as pdf. If false - rendered area default. The default value is false.
      • getPixelOffsetMode/setPixelOffsetMode

        public int getPixelOffsetMode() / public void setPixelOffsetMode(int value)
        
        Gets or set a value specifying how pixels are offset during rendering. The value of the property is PixelOffsetMode integer constant. This property has effect only when saving to raster image formats. The default value is PixelOffsetMode.
      • getSmoothingMode/setSmoothingMode

        public int getSmoothingMode() / public void setSmoothingMode(int value)
        
        Specifies whether smoothing (antialiasing) is applied to lines and curves and the edges of filled areas. The value of the property is SmoothingMode integer constant. This property has effect only when saving to raster image formats. The default value is SmoothingMode.
      • getCompositingQuality/setCompositingQuality

        public int getCompositingQuality() / public void setCompositingQuality(int value)
        
        Specifies the quality level to use during compositing. The value of the property is CompositingQuality integer constant. This property has effect only when saving to raster image formats. The default value is CompositingQuality.
      • getInterpolationMode/setInterpolationMode

        public int getInterpolationMode() / public void setInterpolationMode(int value)
        
        Specifies the algorithm that is used when images are scaled or rotated. The value of the property is InterpolationMode integer constant. This property has effect only when saving to raster image formats. The default value is InterpolationMode.
      • getPageSize/setPageSize

        public PageSize getPageSize() / public void setPageSize(PageSize value)
        
        Gets or sets the page size for the generated images. Can be PageSize or null. The default value is null. If PageSize is null then page size for generated image is obtained from source diagram.
      • getShapes/setShapes

        public ShapeCollection getShapes() / public void setShapes(ShapeCollection value)
        
        Gets or sets shapes to render. Default count is 0.
      • getArea

        public java.awt.geom.Rectangle2D.Float getArea()
        
        Gets or sets the area of the shapes will be saved . This property has effect only when saving to raster image formats.
      • getExportGuideShapes/setExportGuideShapes

        public boolean getExportGuideShapes() / public void setExportGuideShapes(boolean value)
        
        Defines whether need exporting the guide shapes or not. Default value is true.
      • isExportComments/setExportComments

        public boolean isExportComments() / public void setExportComments(boolean value)
        
        Defines whether need exporting the comments or not. Default value is false.
      • getEnlargePage/setEnlargePage

        public boolean getEnlargePage() / public void setEnlargePage(boolean value)
        
        Specifies whether enlarge page . If true - enlarge page. If false - not enlarge page. The default value is true.
      • getEmfRenderSetting/setEmfRenderSetting

        public int getEmfRenderSetting() / public void setEmfRenderSetting(int value)
        
        Setting for rendering Emf metafile. The value of the property is EmfRenderSetting integer constant. EMF metafiles identified as "EMF+ Dual" can contain both EMF+ records and EMF records. Either type of record can be used to render the image, only EMF+ records, or only EMF records. When #Error Cref: !:EmfRenderSetting.EmfPlusPrefer is set, then EMF+ records will be parsed , otherwise only EMF records will be parsed. Default value is #Error Cref: !:EmfRenderSetting.EmfOnly.
      • getDefaultFont/setDefaultFont

        public java.lang.String getDefaultFont() / public void setDefaultFont(java.lang.String value)
        
        When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally, they may appear as block in pdf, image or XPS. Set the DefaultFont such as MingLiu or MS Gothic to show these characters.
      • getWarningCallback/setWarningCallback

        public IWarningCallback getWarningCallback() / public void setWarningCallback(IWarningCallback value)
        
        Gets or sets warning callback.