public class BlackWhiteAdjustmentLayer extends AdjustmentLayer
The Black and White adjustment layer class.
AdjustmentLayer,
LayerAn 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();
}
RasterCachedImage.RotateTestModeBlendSignature, LayerHeaderSize| Modifier and Type | Method and Description |
|---|---|
String |
getBlackAndWhitePresetFileName()
Gets or sets the black and white preset file name.
|
int |
getBlues()
Gets or sets the blues value.
|
int |
getBwPresetKind()
Gets or sets the black and white preset kind value.
|
int |
getCyans()
Gets or sets the cyans value.
|
int |
getGreens()
Gets or sets the greens value.
|
int |
getMagentas()
Gets or sets the magentas value.
|
int |
getReds()
Gets or sets the reds value.
|
int |
getTintColor()
Gets or sets the Tint Color value.
|
double |
getTintColorBlue()
Gets or sets the Blue Tint Color double value.
|
double |
getTintColorGreen()
Gets or sets the Green Tint Color double value.
|
double |
getTintColorRed()
Gets or sets the Red Tint Color double value.
|
boolean |
getUseTint()
Gets or sets a value indicating whether [tint color] is used.
|
int |
getYellows()
Gets or sets the yellows value.
|
void |
setBlackAndWhitePresetFileName(String value)
Gets or sets the black and white preset file name.
|
void |
setBlues(int value)
Gets or sets the blues value.
|
void |
setBwPresetKind(int value)
Gets or sets the black and white preset kind value.
|
void |
setCyans(int value)
Gets or sets the cyans value.
|
void |
setGreens(int value)
Gets or sets the greens value.
|
void |
setMagentas(int value)
Gets or sets the magentas value.
|
void |
setReds(int value)
Gets or sets the reds value.
|
void |
setTintColor(int value)
Gets or sets the Tint Color value.
|
void |
setTintColorBlue(double value)
Gets or sets the Blue Tint Color double value.
|
void |
setTintColorGreen(double value)
Gets or sets the Green Tint Color double value.
|
void |
setTintColorRed(double value)
Gets or sets the Red Tint Color double value.
|
void |
setUseTint(boolean value)
Gets or sets a value indicating whether [tint color] is used.
|
void |
setYellows(int value)
Gets or sets the yellows value.
|
mergeLayerToaddLayerMask, drawImage, equals, getBitsPerPixel, getBlendingOptions, getBlendModeKey, getBlendModeSignature, getBottom, getChannelInformation, getChannelsCount, getClipping, getDisplayName, getExtraLength, getFiller, getFillOpacity, getFlags, getHeight, getLayerBlendingRangesData, getLayerCreationDateTime, getLayerLock, getLayerMaskData, getLayerOptions, getLeft, getLength, getName, getOpacity, getResources, getRight, getSheetColorHighlight, getTop, getWidth, hasAlpha, hashCode, isVisible, isVisibleInGroup, save, save, save, save, setBlendModeKey, setBottom, setChannelInformation, setClipping, setDisplayName, setFiller, setFillOpacity, setFlags, setLayerBlendingRangesData, setLayerCreationDateTime, setLayerLock, setLayerMaskData, setLeft, setName, setOpacity, setResources, setRight, setSheetColorHighlight, setTop, setVisible, shallowCopyadjustBrightness, adjustContrast, adjustGamma, adjustGamma, binarizeBradley, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, doRotate, getRotateMode, grayscale, isCached, resize, resize, rotate, rotateFlipcrop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getImageOpacity, getModifyDate, getPixel, getPremultiplyComponents, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getSkewAngle, getTransparentColor, getUpdateXmpData, getUseRawData, getVerticalResolution, getXmpData, hasTransparentColor, isRawDataAvailable, isUsePalette, loadArgb32Pixels, loadArgb64Pixels, loadCmyk32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, loadRawData, normalizeAngle, normalizeAngle, readArgb32ScanLine, readScanLine, replaceColor, replaceColor, replaceNonTransparentColors, replaceNonTransparentColors, rotate, saveArgb32Pixels, saveCmyk32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setPremultiplyComponents, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setUpdateXmpData, setUseRawData, setVerticalResolution, setXmpData, toBitmap, writeArgb32ScanLine, writeScanLinecanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProgressEventHandler, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setBufferSizeHint, setInterruptMonitor, setPalettegetDataStreamContainer, save, save, save, setDataStreamContainerclose, dispose, getDisposedpublic final int getReds()
Gets or sets the reds value.
Value: The reds value.public final void setReds(int value)
Gets or sets the reds value.
Value: The reds value.public final int getYellows()
Gets or sets the yellows value.
Value: The yellows value.public final void setYellows(int value)
Gets or sets the yellows value.
Value: The yellows value.public final int getGreens()
Gets or sets the greens value.
Value: The greens value.public final void setGreens(int value)
Gets or sets the greens value.
Value: The greens value.public final int getCyans()
Gets or sets the cyans value.
Value: The cyans value.public final void setCyans(int value)
Gets or sets the cyans value.
Value: The cyans value.public final int getBlues()
Gets or sets the blues value.
Value: The blues value.public final void setBlues(int value)
Gets or sets the blues value.
Value: The blues value.public final int getMagentas()
Gets or sets the magentas value.
Value: The magentas value.public final void setMagentas(int value)
Gets or sets the magentas value.
Value: The magentas value.public final boolean getUseTint()
Gets or sets a value indicating whether [tint color] is used.
Value:true if used [tint color]; otherwise, false.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.public final int getTintColor()
Gets or sets the Tint Color value.
Value: The Tint Color value.public final void setTintColor(int value)
Gets or sets the Tint Color value.
Value: The Tint Color value.public final int getBwPresetKind()
Gets or sets the black and white preset kind value.
Value: The black and white preset kind value.public final void setBwPresetKind(int value)
Gets or sets the black and white preset kind value.
Value: The black and white preset kind value.public final String getBlackAndWhitePresetFileName()
Gets or sets the black and white preset file name.
Value: The black and white preset file name.public final void setBlackAndWhitePresetFileName(String value)
Gets or sets the black and white preset file name.
Value: The black and white preset file name.public final double getTintColorRed()
Gets or sets the Red Tint Color double value.
Value: The Red Tint Color double value.public final void setTintColorRed(double value)
Gets or sets the Red Tint Color double value.
Value: The Red Tint Color double value.public final double getTintColorGreen()
Gets or sets the Green Tint Color double value.
Value: The Green Tint Color double value.public final void setTintColorGreen(double value)
Gets or sets the Green Tint Color double value.
Value: The Green Tint Color double value.public final double getTintColorBlue()
Gets or sets the Blue Tint Color double value.
Value: The Blue Tint Color double value.public final void setTintColorBlue(double value)
Gets or sets the Blue Tint Color double value.
Value: The Blue Tint Color double value.Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.