Packages

 

com.aspose.psd.fileformats.psd.layers.adjustmentlayers

Class BlackWhiteAdjustmentLayer

  • All Implemented Interfaces:
    IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader


    public class BlackWhiteAdjustmentLayer
    extends AdjustmentLayer

    The Black and White adjustment layer class.

    See Also:
    AdjustmentLayer, Layer
    Code example:

    An example of adding a new black and white adjustment layer to a PSD file. It uses a predefined method to create the black and white adjustment layer and bind one to the document then explicitly saves a changed copy of the document as a new PSD file.


                
    String inPsdFileName = "Stripes.psd";
    String outPsdFileName = "Output" + inPsdFileName;
                
    // Load a regular PSD file
    PsdImage psdImage = (PsdImage)Image.load(inPsdFileName);
    try
    {
        // Add a new black and white adjustment layer to the document
        BlackWhiteAdjustmentLayer blwhLayer = psdImage.addBlackWhiteAdjustmentLayer();
                
        // Customize color properties of the layer
        blwhLayer.setName("BlackWhiteAdjustmentLayer");
        blwhLayer.setReds(22);
        blwhLayer.setYellows(92);
        blwhLayer.setGreens(70);
        blwhLayer.setCyans(79);
        blwhLayer.setBlues(7);
        blwhLayer.setMagentas(28);
                
        // Save a copy of the loaded PSD file including the changes on the specified path
        psdImage.save(outPsdFileName, new PsdOptions());
    }
    finally
    {
        psdImage.dispose();
    }
    

    • Method Detail

      • getReds

        public final int getReds()

        Gets or sets the reds value.

        Value: The reds value.
      • setReds

        public final void setReds(int value)

        Gets or sets the reds value.

        Value: The reds value.
      • getYellows

        public final int getYellows()

        Gets or sets the yellows value.

        Value: The yellows value.
      • setYellows

        public final void setYellows(int value)

        Gets or sets the yellows value.

        Value: The yellows value.
      • getGreens

        public final int getGreens()

        Gets or sets the greens value.

        Value: The greens value.
      • setGreens

        public final void setGreens(int value)

        Gets or sets the greens value.

        Value: The greens value.
      • getCyans

        public final int getCyans()

        Gets or sets the cyans value.

        Value: The cyans value.
      • setCyans

        public final void setCyans(int value)

        Gets or sets the cyans value.

        Value: The cyans value.
      • getBlues

        public final int getBlues()

        Gets or sets the blues value.

        Value: The blues value.
      • setBlues

        public final void setBlues(int value)

        Gets or sets the blues value.

        Value: The blues value.
      • getMagentas

        public final int getMagentas()

        Gets or sets the magentas value.

        Value: The magentas value.
      • setMagentas

        public final void setMagentas(int value)

        Gets or sets the magentas value.

        Value: The magentas value.
      • getUseTint

        public final boolean getUseTint()

        Gets or sets a value indicating whether [tint color] is used.

        Value: true if used [tint color]; otherwise, false.
      • setUseTint

        public final void setUseTint(boolean value)

        Gets or sets a value indicating whether [tint color] is used.

        Value: true if used [tint color]; otherwise, false.
      • getTintColor

        public final int getTintColor()

        Gets or sets the Tint Color value.

        Value: The Tint Color value.
      • setTintColor

        public final void setTintColor(int value)

        Gets or sets the Tint Color value.

        Value: The Tint Color value.
      • getBwPresetKind

        public final int getBwPresetKind()

        Gets or sets the black and white preset kind value.

        Value: The black and white preset kind value.
      • setBwPresetKind

        public final void setBwPresetKind(int value)

        Gets or sets the black and white preset kind value.

        Value: The black and white preset kind value.
      • getBlackAndWhitePresetFileName

        public final String getBlackAndWhitePresetFileName()

        Gets or sets the black and white preset file name.

        Value: The black and white preset file name.
      • setBlackAndWhitePresetFileName

        public final void setBlackAndWhitePresetFileName(String value)

        Gets or sets the black and white preset file name.

        Value: The black and white preset file name.
      • getTintColorRed

        public final double getTintColorRed()

        Gets or sets the Red Tint Color double value.

        Value: The Red Tint Color double value.
      • setTintColorRed

        public final void setTintColorRed(double value)

        Gets or sets the Red Tint Color double value.

        Value: The Red Tint Color double value.
      • getTintColorGreen

        public final double getTintColorGreen()

        Gets or sets the Green Tint Color double value.

        Value: The Green Tint Color double value.
      • setTintColorGreen

        public final void setTintColorGreen(double value)

        Gets or sets the Green Tint Color double value.

        Value: The Green Tint Color double value.
      • getTintColorBlue

        public final double getTintColorBlue()

        Gets or sets the Blue Tint Color double value.

        Value: The Blue Tint Color double value.
      • setTintColorBlue

        public final void setTintColorBlue(double value)

        Gets or sets the Blue Tint Color double value.

        Value: The Blue Tint Color double value.