Packages

 

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

Class PhflResourceVersion2



  • public class PhflResourceVersion2
    extends PhflResource

    Class PhflResource. Resource of Exposure Adjustment Layer 2 Version ( = 3 ) or ( = 2 ) 12 4 bytes each for XYZ color(Only in Version 3) 10 2 bytes color space followed by 4 * 2 bytes color component(Only in Version 2) 4 Density 1 Preserve Luminosity

    See Also:
    AdjustmentLayerResource, LayerResource
    • Constructor Detail

      • PhflResourceVersion2

        public PhflResourceVersion2()

        Initializes a new instance of the PhflResourceVersion2 class.

      • PhflResourceVersion2

        public PhflResourceVersion2(byte[] data)

        Initializes a new instance of the PhflResourceVersion2 class.

        Parameters:
        data - The data pf the resource.
        Throws:
        PsdImageArgumentException - Invalid data length
    • Method Detail

      • getColorSpace

        public final short getColorSpace()

        Gets the color space.

        Returns:
        the color space.
      • getComponentL

        public final short getComponentL()

        Gets the L component of color

        Returns:
        the L component of color
        Throws:
        PsdImageArgumentException - L Color must be in range from 0 to 10000 Value: The L component.
      • setComponentL

        public final void setComponentL(short value)

        Sets the L component of color

        Parameters:
        value - the L component of color
        Throws:
        PsdImageArgumentException - L Color must be in range from 0 to 10000 Value: The L component.
      • getComponentA

        public final short getComponentA()

        Gets the A component of color

        Returns:
        the A component of color
        Throws:
        PsdImageArgumentException - A Color must be in range from -12800 to 12700 Value: The A component.
      • setComponentA

        public final void setComponentA(short value)

        Sets the A component of color

        Parameters:
        value - the A component of color
        Throws:
        PsdImageArgumentException - A Color must be in range from -12800 to 12700 Value: The A component.
      • getComponentB

        public final short getComponentB()

        Gets the B component

        Returns:
        the B component
        Throws:
        PsdImageArgumentException - B Color must be in range from -12800 to 12700 Value: The B component.
      • setComponentB

        public final void setComponentB(short value)

        Sets the B component

        Parameters:
        value - the B component
        Throws:
        PsdImageArgumentException - B Color must be in range from -12800 to 12700 Value: The B component.
      • getVersion

        public short getVersion()

        Gets the version.

        Specified by:
        getVersion in class PhflResource
        Returns:
        The version.
      • getKey

        public int getKey()

        Gets the layer resource key.

        Overrides:
        getKey in class PhflResource
        Returns:
        the layer resource key.
      • getPsdVersion

        public int getPsdVersion()

        Gets the psd version.

        Overrides:
        getPsdVersion in class PhflResource
        Returns:
        the psd version.
      • getLength

        public int getLength()

        Gets the layer resource length in bytes.

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

        public void setRgbColor(Color color)

        Sets the RGB color.

        Specified by:
        setRgbColor in class PhflResource
        Parameters:
        color - The color.
      • 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.