Packages

 

com.aspose.imaging.fileformats.psd.layers.layerresources

Class Hue2Resource

    • Field Detail

      • TYPE_TOOL_KEY

        public static final int TYPE_TOOL_KEY

        The type tool info key.

        See Also:
        Constant Field Values
    • Constructor Detail

      • Hue2Resource

        public Hue2Resource()

        Initializes a new instance of the Hue2Resource class.

      • Hue2Resource

        public Hue2Resource(byte[] data)

        Initializes a new instance of the Hue2Resource class.

        Parameters:
        data - The data of the resource.
        Throws:
        PsdImageArgumentException - Invalid Hue2 Resource data
    • Method Detail

      • getVersion

        public final short getVersion()

        Gets the version. Default is 2

        Returns:
      • getColorize

        public final boolean getColorize()

        Gets a value indicating whether this Hue2Resource is colorize.

        Returns:
      • setColorize

        public final void setColorize(boolean value)

        Sets a value indicating whether this Hue2Resource is colorize.

        Parameters:
        value -
      • getHue

        public final short getHue()

        Gets the master hue.

        Returns:
      • setHue

        public final void setHue(short value)

        Sets the master hue.

        Parameters:
        value -
      • getSaturation

        public final short getSaturation()

        Gets the master saturation.

        Returns:
      • setSaturation

        public final void setSaturation(short value)

        Sets the master saturation.

        Parameters:
        value -
      • getLightness

        public final short getLightness()

        Gets the master lightness.

        Returns:
      • setLightness

        public final void setLightness(short value)

        Sets the master lightness.

        Parameters:
        value -
      • getRanges

        public final ColorRangeHsl[] getRanges()

        Gets the ranges of Hue/Saturation Adjustment Layer. Ranges in PS can change names if range is changed, so we should work by index

        Returns:
      • getKey

        public int getKey()

        Gets the layer resource key.

        Specified by:
        getKey in class LayerResource
        Returns:
        the layer resource key.
      • getLength

        public int getLength()

        Gets the layer resource length in bytes.

        Specified by:
        getLength in class LayerResource
        Returns:
        the layer resource length in bytes.
      • getPsdVersion

        public int getPsdVersion()

        Gets the psd version.

        Specified by:
        getPsdVersion in class LayerResource
        Returns:
        the psd version.
      • save

        public void save(StreamContainer streamContainer,
                         int psdVersion)

        Saves the resource to the specified stream container.

        Overrides:
        save in class AdjustmentLayerResource
        Parameters:
        streamContainer - The stream container to save to.
        psdVersion - The PSD version.