Packages

 

com.aspose.psd.imageloadoptions

Class PsdLoadOptions



  • public class PsdLoadOptions
    extends LoadOptions

    Psd load options

    • Constructor Detail

      • PsdLoadOptions

        public PsdLoadOptions()

        Initializes a new instance of the PsdLoadOptions class.

    • Method Detail

      • getLoadEffectsResource

        public final boolean getLoadEffectsResource()

        Gets or sets a value indicating whether [load effects resource] (by default resource is not loaded). When set this option only supported effects will be rendered to final merged image.

        Value: true if [load effects resource]; otherwise, false.
      • setLoadEffectsResource

        public final void setLoadEffectsResource(boolean value)

        Gets or sets a value indicating whether [load effects resource] (by default resource is not loaded). When set this option only supported effects will be rendered to final merged image.

        Value: true if [load effects resource]; otherwise, false.
        Code example:

        An example of exporting to raster image formats when using layer effects and adjustment layers. It explicitly loads layers and effects and saves a changed copy of the document as a new PSD file.


                    
        String inPsdFilePath = "clip_shadow.psd";
        String outPngFilePath = "output.png";
                    
        // Provide options for loading effects
        PsdLoadOptions psdLoadOptions = new PsdLoadOptions();
        psdLoadOptions.setLoadEffectsResource(true);
                    
        // Load a PSD file containing a predefined adjustment layers and effects
        PsdImage psdImage = (PsdImage)Image.load(inPsdFilePath, psdLoadOptions);
        try
        {
            // Save a copy of loaded PSD file on the specified path
            psdImage.save(outPngFilePath, new PngOptions());
        }
        finally
        {
            psdImage.dispose();
        }
        

      • getUseDiskForLoadEffectsResource

        public final boolean getUseDiskForLoadEffectsResource()

        Gets or sets a value indicating whether [use disk for load effects resource] (by default used disk to load effects resource, but can be used memory if it is enought by setting this value to false).

        Value: true if [use disk for load effects resource]; otherwise, false.
      • setUseDiskForLoadEffectsResource

        public final void setUseDiskForLoadEffectsResource(boolean value)

        Gets or sets a value indicating whether [use disk for load effects resource] (by default used disk to load effects resource, but can be used memory if it is enought by setting this value to false).

        Value: true if [use disk for load effects resource]; otherwise, false.
      • getReadOnlyMode

        public final boolean getReadOnlyMode()

        Gets or sets a value indicating whether [use read only mode]. This is read-only mode, supported for identical compatibility with Adobe Photoshop. When this option is set, all changes applied for layers will not be saved to final image. All data is used from ImageData section, so it is identical to Photoshop. By default all loaded images are not identical to Adobe Photoshop compatible.

        Value: true if [use photoshop compatibility mode]; otherwise, false.
      • setReadOnlyMode

        public final void setReadOnlyMode(boolean value)

        Gets or sets a value indicating whether [use read only mode]. This is read-only mode, supported for identical compatibility with Adobe Photoshop. When this option is set, all changes applied for layers will not be saved to final image. All data is used from ImageData section, so it is identical to Photoshop. By default all loaded images are not identical to Adobe Photoshop compatible.

        Value: true if [use photoshop compatibility mode]; otherwise, false.
      • getIgnoreTextLayerWidthOnUpdate

        public final boolean getIgnoreTextLayerWidthOnUpdate()

        Gets or sets a value indicating whether PSD text layer fixed width will be ignored on UpdateText operation execution.

        Value: true if [ignore text layer width]; otherwise, false.
      • setIgnoreTextLayerWidthOnUpdate

        public final void setIgnoreTextLayerWidthOnUpdate(boolean value)

        Gets or sets a value indicating whether PSD text layer fixed width will be ignored on UpdateText operation execution.

        Value: true if [ignore text layer width]; otherwise, false.
      • getIgnoreAlphaChannel

        public final boolean getIgnoreAlphaChannel()

        Gets or sets a value indicating whether [ignore alpha channel].

        Value: true if [ignore alpha channel]; otherwise, false.
      • setIgnoreAlphaChannel

        public final void setIgnoreAlphaChannel(boolean value)

        Gets or sets a value indicating whether [ignore alpha channel].

        Value: true if [ignore alpha channel]; otherwise, false.