Packages

 

com.aspose.psd

Interfaces

Classes

Exceptions

com.aspose.psd

Class ImageOptionsBase

    • Method Detail

      • getDefaultReplacementFont

        public String getDefaultReplacementFont()

        Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system). To take proper name of default font can be used next code snippet: System.Drawing.Text.InstalledFontCollection col = new System.Drawing.Text.InstalledFontCollection(); System.Drawing.FontFamily[] families = col.Families; string defaultFontName = families[0].Name; PsdLoadOptions psdLoadOptions = new PsdLoadOptions() { DefaultReplacementFont = defaultFontName });

        Value: The default replacement font.
      • setDefaultReplacementFont

        public void setDefaultReplacementFont(String value)

        Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system). To take proper name of default font can be used next code snippet: System.Drawing.Text.InstalledFontCollection col = new System.Drawing.Text.InstalledFontCollection(); System.Drawing.FontFamily[] families = col.Families; string defaultFontName = families[0].Name; PsdLoadOptions psdLoadOptions = new PsdLoadOptions() { DefaultReplacementFont = defaultFontName });

        Value: The default replacement font.
        Code example:

        This example demonstrates how to set a Default Replacement Font during saving the image. The program applies different default font replacements for different output files.


                    
        // Please, don't install Konstanting Font, because this test should replace font that is not installed
        String srcPsdPath = "sample_konstanting.psd";
        String[] dstPaths = new String[]
                {
                        "replacedfont0.tiff",
                        "replacedfont1.png",
                        "replacedfont2.jpg"
                };
                    
        // Load a PSD that require a font that is not installed
        PsdImage image = (PsdImage)Image.load(srcPsdPath);
        try
        {
            // This way you can use different fonts for different outputs
            image.save(dstPaths[0], new TiffOptions(TiffExpectedFormat.TiffJpegRgb));
                    
            PngOptions pngOptions = new PngOptions();
            pngOptions.setDefaultReplacementFont("Verdana");
            image.save(dstPaths[1], pngOptions);
                    
            JpegOptions jpegOptions = new JpegOptions();
            jpegOptions.setDefaultReplacementFont("Times New Roman");
            image.save(dstPaths[2], jpegOptions);
        }
        finally
        {
            image.dispose();
        }
        

      • getXmpData

        public XmpPacketWrapper getXmpData()

        Gets or sets the XMP metadata container.

        Value: The XMP data container.
      • setXmpData

        public void setXmpData(XmpPacketWrapper value)

        Gets or sets the XMP metadata container.

        Value: The XMP data container.
      • getSource

        public final Source getSource()

        Gets or sets the source to create image in.

        Value: The source to create image in.
      • setSource

        public final void setSource(Source value)

        Gets or sets the source to create image in.

        Value: The source to create image in.
      • getPalette

        public IColorPalette getPalette()

        Gets or sets the color palette.

        Value: The color palette.
      • setPalette

        public void setPalette(IColorPalette value)

        Gets or sets the color palette.

        Value: The color palette.
      • getResolutionSettings

        public ResolutionSetting getResolutionSettings()

        Gets or sets the resolution settings.

      • setResolutionSettings

        public void setResolutionSettings(ResolutionSetting value)

        Gets or sets the resolution settings.

      • getVectorRasterizationOptions

        public final VectorRasterizationOptions getVectorRasterizationOptions()

        Gets or sets the vector rasterization options.

        Value: The vector rasterization options.
      • setVectorRasterizationOptions

        public final void setVectorRasterizationOptions(VectorRasterizationOptions value)

        Gets or sets the vector rasterization options.

        Value: The vector rasterization options.
      • getBufferSizeHint

        public final int getBufferSizeHint()

        Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.

        Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal buffers
      • setBufferSizeHint

        public final void setBufferSizeHint(int value)

        Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.

        Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal buffers
      • getMultiPageOptions

        public final MultiPageOptions getMultiPageOptions()

        The multipage options

      • setMultiPageOptions

        public final void setMultiPageOptions(MultiPageOptions value)

        The multipage options

      • getFullFrame

        public final boolean getFullFrame()

        Gets a value indicating whether [full frame].

        Value: true if [full frame]; otherwise, false.
        Returns:
        a value indicating whether [full frame].
      • setFullFrame

        public final void setFullFrame(boolean value)

        Sets a value indicating whether [full frame].

        Value: true if [full frame]; otherwise, false.
        Parameters:
        value - a value indicating whether [full frame].
      • getProgressEventHandler

        public final ProgressEventHandler getProgressEventHandler()

        Gets or sets the progress event handler.

        Value: The progress event handler.
      • setProgressEventHandler

        public final void setProgressEventHandler(ProgressEventHandler value)

        Gets or sets the progress event handler.

        Value: The progress event handler.
      • deepClone

        public ImageOptionsBase deepClone()

        Clones this instance.

        Returns:
        Returns shallow copy of this instance