public final class PsdImage extends RasterCachedImage implements com.aspose.imaging_internal.ILayerableImage
A PSD image.
RasterCachedImage.RotateTestMode
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_VERSION
The default PSD version.
|
Constructor and Description |
---|
PsdImage(InputStream stream)
Creates new instance of psd image
PsdImage class from specified path from raster image (not psd image in stream). |
PsdImage(InputStream stream,
short colorMode,
short channelBitDepth,
short channels,
int psdVersion,
short compression)
Creates new instance of psd image
PsdImage class from specified path from raster image (not psd image in stream) with constructor parameters. |
PsdImage(int width,
int height)
Creates new instance of psd image
PsdImage class with specified width and height. |
PsdImage(int width,
int height,
IColorPalette colorPalette,
short colorMode,
short channelBitDepth,
short channels,
int psdVersion,
short compression)
Creates new instance of psd image
PsdImage class with specified width,height, paletter, color mode, channels count and channels bit-length and specified compression mode parameters. |
PsdImage(RasterImage rasterImage)
Creates new instance of psd image
PsdImage class from existing raster image (not psd image) with RGB color mode with 4 channels 8 bit/channel and no compression. |
PsdImage(RasterImage rasterImage,
short colorMode,
short channelBitDepth,
short channels,
int psdVersion,
short compression)
Creates new instance of psd image
PsdImage class from existing raster image (not psd image) with constructor parameters. |
PsdImage(String path)
Creates new instance of psd image
PsdImage class from specified path from raster image (not psd image in path). |
PsdImage(String path,
short colorMode,
short channelBitDepth,
short channels,
int psdVersion,
short compression)
Creates new instance of psd image
PsdImage class from specified path from raster image (not psd image in path) with constructor parameters. |
Modifier and Type | Method and Description |
---|---|
BrightnessContrastLayer |
addBrightnessContrastAdjustmentLayer(int brightness,
int contrast)
Adds the brightness/contrast adjustment layer.
|
ChannelMixerLayer |
addChannelMixerAdjustmentLayer()
Adds the channel mixer adjustment layer with default parameters
|
CurvesLayer |
addCurvesAdjustmentLayer()
Adds the Curves Adjustment layer.
|
ExposureLayer |
addExposureAdjustmentLayer() |
ExposureLayer |
addExposureAdjustmentLayer(float exposure) |
ExposureLayer |
addExposureAdjustmentLayer(float exposure,
float offset) |
ExposureLayer |
addExposureAdjustmentLayer(float exposure,
float offset,
float gammaCorrection)
Adds the exposure adjustment layer.
|
ExposureLayer |
addExposureLayer() |
ExposureLayer |
addExposureLayer(float exposure) |
ExposureLayer |
addExposureLayer(float exposure,
float offset) |
ExposureLayer |
addExposureLayer(float exposure,
float offset,
float gammaCorrection)
Adds the exposure adjustment layer.
|
HueSaturationLayer |
addHueSaturationAdjustmentLayer()
Adds the hue/saturation adjustment layer.
|
LayerGroup |
addLayerGroup(String groupName,
int index,
boolean startBehaviour)
Adds the layer group.
|
LevelsLayer |
addLevelsAdjustmentLayer()
Adds the Levels adjustment layer.
|
PhotoFilterLayer |
addPhotoFilterLayer(Color color)
Adds the photofilter layer.
|
TextLayer |
addTextLayer(String text,
Rectangle rect)
Adds a new Text layer.
|
void |
adjustBrightness(int brightness)
Adjust of a brightness for image.
|
void |
adjustContrast(float contrast)
Image contrasting
|
void |
adjustGamma(float gamma)
Gamma-correction of an image.
|
void |
adjustGamma(float gammaRed,
float gammaGreen,
float gammaBlue)
Gamma-correction of an image.
|
void |
binarizeBradley(double brightnessDifference)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
|
void |
binarizeBradley(double brightnessDifference,
int windowSize)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
|
void |
binarizeFixed(byte threshold)
Binarization of an image with predefined threshold
|
void |
binarizeOtsu()
Binarization of an image with Otsu thresholding
|
void |
crop(Rectangle rectangle)
Cropping the image.
|
void |
dither(int ditheringMethod,
int bitsCount,
IColorPalette customPalette)
Performs dithering on the current image.
|
void |
filter(Rectangle rectangle,
FilterOptionsBase options)
Filters the specified rectangle.
|
void |
flattenImage()
Flattens all layers.
|
Layer |
getActiveLayer()
Gets the active layer.
|
int |
getBitsPerChannel()
Gets the bits per channel.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
int |
getChannelsCount()
Gets the PSD channels count.
|
StreamSource |
getCmykColorProfile()
The CMYK color profile for CMYK PSD images.
|
short |
getColorMode()
Gets the color mode.
|
short |
getCompression()
Gets the compression method.
|
long |
getFileFormat()
Gets a value of file format
|
GlobalLayerMaskInfo |
getGlobalLayerMaskInfo()
Gets the global layer mask info.
|
LayerResource[] |
getGlobalLayerResources()
Gets the global layer resources.
|
StreamSource |
getGrayColorProfile()
The GRAY (monochrome) color profile for Grayscale PSD images.
|
int |
getHeight()
Gets the image height.
|
double |
getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this
PsdImage . |
ResourceBlock[] |
getImageResources()
Gets the PSD image resources.
|
Layer[] |
getLayers()
Gets the PSD layers.
|
PixelDataFormat |
getRawDataFormat()
Gets the raw data format.
|
StreamSource |
getRgbColorProfile()
The RGB color profile for CMYK PSD images.
|
int |
getVersion()
Gets the version.
|
double |
getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this
PsdImage . |
int |
getWidth()
Gets the image width.
|
XmpPacketWrapper |
getXmpData()
Gets the XMP metadata.
|
void |
grayscale()
Transformation of an image to its grayscale representation
|
boolean |
hasAlpha()
Gets or sets the vertical resolution, in pixels per inch, of this
RasterImage . |
boolean |
hasTransparencyData()
Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
|
boolean |
isFlatten()
Gets a value indicating whether psd image is flattened.
|
Layer |
mergeLayers(Layer bottomLayer,
Layer topLayer)
Merges the layers.
|
void |
replaceColor(int oldColorArgb,
byte oldColorDiff,
int newColorArgb)
Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
|
void |
replaceNonTransparentColors(int newColorArgb)
Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges.
|
void |
resizeHeightProportionally(int newHeight,
ImageResizeSettings settings)
Resizes the height proportionally.
|
void |
resizeHeightProportionally(int newHeight,
int resizeType)
Resizes the height proportionally.
|
void |
resizeWidthProportionally(int newWidth,
ImageResizeSettings settings)
Resizes the width proportionally.
|
void |
resizeWidthProportionally(int newWidth,
int resizeType)
Resizes the width proportionally.
|
void |
rotate(float angle)
Rotate image around the center.
|
void |
rotate(float angle,
boolean resizeProportionally,
Color backgroundColor)
Rotate image around the center.
|
void |
setActiveLayer(Layer value)
Sets the active layer.
|
void |
setCmykColorProfile(StreamSource value)
The CMYK color profile for CMYK PSD images.
|
void |
setColorMode(short value)
Sets the color mode.
|
void |
setGlobalLayerResources(LayerResource[] value)
Sets the global layer resources.
|
void |
setGrayColorProfile(StreamSource value)
The GRAY (monochrome) color profile for Grayscale PSD images.
|
void |
setHorizontalResolution(double value)
Sets the horizontal resolution, in pixels per inch, of this
PsdImage . |
void |
setImageResources(ResourceBlock[] value)
Sets the PSD image resources.
|
void |
setLayers(Layer[] value)
Sets the PSD layers.
|
void |
setRgbColorProfile(StreamSource value)
The RGB color profile for CMYK PSD images.
|
void |
setTransparencyData(boolean value)
Sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
|
void |
setVersion(int value)
Sets the version.
|
void |
setVerticalResolution(double value)
Sets the vertical resolution, in pixels per inch, of this
PsdImage . |
void |
setXmpData(XmpPacketWrapper value)
Sets the XMP metadata.
|
cacheData, getMaxAllowedAllocationForPartialRotateSave, getRotateMode, isCached, resize, resize, rotateFlip, setMaxAllowedAllocationForPartialRotateSave, setRotateMode
crop, dither, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getImageOpacity, getModifyDate, getPixel, getPremultiplyComponents, getRawCustomColorConverter, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getTransparentColor, getUpdateXmpData, getUseRawData, hasTransparentColor, isRawDataAvailable, loadArgb32Pixels, loadArgb64Pixels, loadCmyk32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, loadRawData, readArgb32ScanLine, readScanLine, replaceColor, replaceNonTransparentColors, saveArgb32Pixels, saveCmyk32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setPalette, setPixel, setPremultiplyComponents, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setUpdateXmpData, setUseRawData, toBitmap, writeArgb32ScanLine, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, create, getBackgroundColor, getBounds, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setInterruptMonitor, setPalette
getDataStreamContainer, save, save, save, save
close, dispose, getDisposed
public static final int DEFAULT_VERSION
The default PSD version.
public PsdImage(String path)
Creates new instance of psd image PsdImage
class from specified path from raster image (not psd image in path). Used to initialize psd image with default parameters - Color mode - rgb, 4 channels, 8 bit per channel, Compression - Raw.
path
- The path to load pixel and palette data from and initialize with.public PsdImage(String path, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)
Creates new instance of psd image PsdImage
class from specified path from raster image (not psd image in path) with constructor parameters.
path
- The path to load pixel and palette data from and initialize with.colorMode
- The color mode.channelBitDepth
- The PSD bit depth per channel.channels
- The PSD channels count.psdVersion
- The PSD version.compression
- The compression to use.public PsdImage(InputStream stream)
Creates new instance of psd image PsdImage
class from specified path from raster image (not psd image in stream). Used to initialize psd image with default parameters - Color mode - rgb, 4 channels, 8 bit per channel, Compression - Raw.
stream
- The stream to load pixel and palette data from and initialize with.public PsdImage(InputStream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)
Creates new instance of psd image PsdImage
class from specified path from raster image (not psd image in stream) with constructor parameters.
stream
- The stream to load pixel and palette data from and initialize with.colorMode
- The color mode.channelBitDepth
- The PSD bit depth per channel.channels
- The PSD channels count.psdVersion
- The PSD version.compression
- The compression to use.public PsdImage(RasterImage rasterImage)
Creates new instance of psd image PsdImage
class from existing raster image (not psd image) with RGB color mode with 4 channels 8 bit/channel and no compression.
rasterImage
- The image to load pixel and palette data from and initialize with.public PsdImage(RasterImage rasterImage, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)
Creates new instance of psd image PsdImage
class from existing raster image (not psd image) with constructor parameters.
rasterImage
- The image to load pixel and palette data from and initialize with.colorMode
- The color mode.channelBitDepth
- The PSD bit depth per channel.channels
- The PSD channels count.psdVersion
- The PSD version.compression
- The compression to use.public PsdImage(int width, int height)
Creates new instance of psd image PsdImage
class with specified width and height. Used to initialize empty psd image.
width
- The image width.height
- The image height.public PsdImage(int width, int height, IColorPalette colorPalette, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)
Creates new instance of psd image PsdImage
class with specified width,height, paletter, color mode, channels count and channels bit-length and specified compression mode parameters. Used to initialize empty psd image.
width
- The image width.height
- The image height.colorPalette
- The color palette.colorMode
- The color mode.channelBitDepth
- The PSD bit depth per channel.channels
- The PSD channels count.psdVersion
- The PSD version.compression
- The compression to use.public XmpPacketWrapper getXmpData()
Gets the XMP metadata.
getXmpData
in class RasterImage
public void setXmpData(XmpPacketWrapper value)
Sets the XMP metadata.
setXmpData
in class RasterImage
value
- The XMP metadata.public long getFileFormat()
Gets a value of file format
getFileFormat
in class Image
public boolean hasAlpha()
Gets or sets the vertical resolution, in pixels per inch, of this RasterImage
.
hasAlpha
in class RasterImage
true
if this instance has alpha; otherwise, false
.public double getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this PsdImage
.
getVerticalResolution
in class RasterImage
PsdImageException
- ResolutionInfo resource not found and can not set proper resolution
Default value for PSD is 72, so if ResolutionInfoResource
wasn't found, this value is returned.
public void setVerticalResolution(double value)
Sets the vertical resolution, in pixels per inch, of this PsdImage
.
setVerticalResolution
in class RasterImage
value
- The vertical resolution.
Default value for PSD is 72, so if ResolutionInfoResource
wasn't found, this value is returned.
PsdImageException
- ResolutionInfo resource not found and can not set proper resolutionpublic double getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this PsdImage
.
getHorizontalResolution
in class RasterImage
PsdImageException
- ResolutionInfo resource not found and can not set proper resolution
Default value for PSD is 72, so if ResolutionInfoResource
wasn't found, this value is returned.
public void setHorizontalResolution(double value)
Sets the horizontal resolution, in pixels per inch, of this PsdImage
.
setHorizontalResolution
in class RasterImage
value
- The horizontal resolution.
Default value for PSD is 72, so if ResolutionInfoResource
wasn't found, this value is returned.
PsdImageException
- ResolutionInfo resource not found and can not set proper resolutionpublic StreamSource getRgbColorProfile()
The RGB color profile for CMYK PSD images. Must be in pair with CmykColorProfile for correct color conversion.
public void setRgbColorProfile(StreamSource value)
The RGB color profile for CMYK PSD images. Must be in pair with CmykColorProfile for correct color conversion.
value
- The RGB color profile.public StreamSource getCmykColorProfile()
The CMYK color profile for CMYK PSD images. Must be in pair with RgbColorProfile for correct color conversion.
public void setCmykColorProfile(StreamSource value)
The CMYK color profile for CMYK PSD images. Must be in pair with RgbColorProfile for correct color conversion.
value
- The CMYK color profile.public StreamSource getGrayColorProfile()
The GRAY (monochrome) color profile for Grayscale PSD images.
public void setGrayColorProfile(StreamSource value)
The GRAY (monochrome) color profile for Grayscale PSD images.
value
- The GRAY (monochrome) color profile.public short getColorMode()
Gets the color mode.
public void setColorMode(short value)
Sets the color mode.
value
- The color mode.public short getCompression()
Gets the compression method.
public int getChannelsCount()
Gets the PSD channels count.
public int getBitsPerChannel()
Gets the bits per channel.
public ResourceBlock[] getImageResources()
Gets the PSD image resources.
public void setImageResources(ResourceBlock[] value)
Sets the PSD image resources.
value
- The PSD image resources.public int getVersion()
Gets the version.
public void setVersion(int value)
Sets the version.
value
- The version.public int getWidth()
Gets the image width.
getWidth
in interface IObjectWithBounds
getWidth
in class Image
public int getHeight()
Gets the image height.
getHeight
in interface IObjectWithBounds
getHeight
in class Image
public int getBitsPerPixel()
Gets the image bits per pixel count.
getBitsPerPixel
in class Image
public Layer[] getLayers()
Gets the PSD layers.
Note that if there are no layers the other related information within layer and mask information section will not be preserved (layer masks, resources and etc).
public void setLayers(Layer[] value)
Sets the PSD layers.
value
- The PSD layers.
Note that if there are no layers the other related information within layer and mask information section will not be preserved (layer masks, resources and etc).
public LayerResource[] getGlobalLayerResources()
Gets the global layer resources.
public void setGlobalLayerResources(LayerResource[] value)
Sets the global layer resources.
value
- The global layer resources.public GlobalLayerMaskInfo getGlobalLayerMaskInfo()
Gets the global layer mask info.
public boolean hasTransparencyData()
Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
true
if first alpha channel contains the transparency data for the merged result when specifying layers data; otherwise, false
.public void setTransparencyData(boolean value)
Sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
value
- true
if first alpha channel contains the transparency data for the merged result when specifying layers data; otherwise, false
.public Layer getActiveLayer()
Gets the active layer.
TiffImageException
- There is no active layer and no layers in image.PsdImageException
- The active layer cannot be set as it belongs to another image.public void setActiveLayer(Layer value)
Sets the active layer.
value
- The active layer.TiffImageException
- There is no active layer and no layers in image.PsdImageException
- The active layer cannot be set as it belongs to another image.public boolean isFlatten()
Gets a value indicating whether psd image is flattened.
true
if this instance is flatten; otherwise, false
.public PixelDataFormat getRawDataFormat()
Gets the raw data format.
getRawDataFormat
in class RasterImage
public final Layer mergeLayers(Layer bottomLayer, Layer topLayer)
Merges the layers.
bottomLayer
- The bottom layer.topLayer
- The top layer.public final void flattenImage()
Flattens all layers.
public final TextLayer addTextLayer(String text, Rectangle rect)
Adds a new Text layer.
text
- The layer's text.rect
- The layer's rectangle.public final CurvesLayer addCurvesAdjustmentLayer()
Adds the Curves Adjustment layer.
CurvesLayer
Layerpublic final ExposureLayer addExposureAdjustmentLayer()
public final ExposureLayer addExposureAdjustmentLayer(float exposure)
public final ExposureLayer addExposureAdjustmentLayer(float exposure, float offset)
public final ExposureLayer addExposureAdjustmentLayer(float exposure, float offset, float gammaCorrection)
Adds the exposure adjustment layer.
exposure
- The exposure.offset
- The offset.gammaCorrection
- The gamma correction.public final HueSaturationLayer addHueSaturationAdjustmentLayer()
Adds the hue/saturation adjustment layer.
public final LevelsLayer addLevelsAdjustmentLayer()
Adds the Levels adjustment layer.
public final PhotoFilterLayer addPhotoFilterLayer(Color color)
Adds the photofilter layer.
color
- The color.public final ExposureLayer addExposureLayer()
public final ExposureLayer addExposureLayer(float exposure)
public final ExposureLayer addExposureLayer(float exposure, float offset)
public final ExposureLayer addExposureLayer(float exposure, float offset, float gammaCorrection)
Adds the exposure adjustment layer.
exposure
- The exposure.offset
- The offset.gammaCorrection
- The gamma correction.public final ChannelMixerLayer addChannelMixerAdjustmentLayer()
Adds the channel mixer adjustment layer with default parameters
public final BrightnessContrastLayer addBrightnessContrastAdjustmentLayer(int brightness, int contrast)
Adds the brightness/contrast adjustment layer.
brightness
- The brightness.contrast
- The contrast.public LayerGroup addLayerGroup(String groupName, int index, boolean startBehaviour)
Adds the layer group.
groupName
- Name of the group.index
- The index of the layer to insert after.startBehaviour
- if set to true
[start behaviour] than group will be in open state on start up, otherwise in minimized state.public void rotate(float angle)
Rotate image around the center.
rotate
in class RasterImage
angle
- The rotate angle in degrees. Positive values will rotate clockwise.public void rotate(float angle, boolean resizeProportionally, Color backgroundColor)
Rotate image around the center.
rotate
in class RasterCachedImage
angle
- The rotate angle in degrees. Positive values will rotate clockwise.resizeProportionally
- if set to true
you will have your image size changed according to rotated rectangle (corner points) projections in other case that leaves dimensions untouched and only internal image contents are rotated.backgroundColor
- Color of the background.public void crop(Rectangle rectangle)
Cropping the image.
crop
in class RasterCachedImage
rectangle
- The rectangle.public void resizeHeightProportionally(int newHeight, ImageResizeSettings settings)
Resizes the height proportionally.
resizeHeightProportionally
in class Image
newHeight
- The new height.settings
- The image resize settings.public void resizeHeightProportionally(int newHeight, int resizeType)
Resizes the height proportionally.
resizeHeightProportionally
in class Image
newHeight
- The new height.resizeType
- Type of the resize.public void resizeWidthProportionally(int newWidth, ImageResizeSettings settings)
Resizes the width proportionally.
resizeWidthProportionally
in class Image
newWidth
- The new width.settings
- The image resize settings.public void resizeWidthProportionally(int newWidth, int resizeType)
Resizes the width proportionally.
resizeWidthProportionally
in class Image
newWidth
- The new width.resizeType
- Type of the resize.public void dither(int ditheringMethod, int bitsCount, IColorPalette customPalette)
Performs dithering on the current image.
dither
in class RasterCachedImage
ditheringMethod
- The dithering method.bitsCount
- The final bits count for dithering.customPalette
- The custom palette for dithering.public void binarizeOtsu()
Binarization of an image with Otsu thresholding
binarizeOtsu
in class RasterCachedImage
public void binarizeBradley(double brightnessDifference, int windowSize)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
binarizeBradley
in class RasterCachedImage
brightnessDifference
- The brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.windowSize
- The size of s x s window of pixels centered around this pixelpublic void binarizeBradley(double brightnessDifference)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
binarizeBradley
in class RasterCachedImage
brightnessDifference
- The brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.public void adjustBrightness(int brightness)
Adjust of a brightness for image.
adjustBrightness
in class RasterCachedImage
brightness
- Brightness value.public void adjustGamma(float gamma)
Gamma-correction of an image.
adjustGamma
in class RasterCachedImage
gamma
- Gamma for red, green and blue channels coefficientpublic void adjustContrast(float contrast)
Image contrasting
adjustContrast
in class RasterCachedImage
contrast
- Contrast value (in range [-100; 100])public void adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)
Gamma-correction of an image.
adjustGamma
in class RasterCachedImage
gammaRed
- Gamma for red channel coefficientgammaGreen
- Gamma for green channel coefficientgammaBlue
- Gamma for blue channel coefficientpublic void binarizeFixed(byte threshold)
Binarization of an image with predefined threshold
binarizeFixed
in class RasterCachedImage
threshold
- Threshold value. If corresponding gray value of a pixel is greater than threshold, a value of 255 will be assigned to it, 0 otherwise.public void grayscale()
Transformation of an image to its grayscale representation
grayscale
in class RasterCachedImage
public void filter(Rectangle rectangle, FilterOptionsBase options)
Filters the specified rectangle.
filter
in class RasterImage
rectangle
- The rectangle.options
- The options.public void replaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)
Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
replaceColor
in class RasterImage
oldColorArgb
- Old color ARGB value to be replaced.oldColorDiff
- Allowed difference in old color to be able to widen replaced color tone.newColorArgb
- New color ARGB value to replace old color with.public void replaceNonTransparentColors(int newColorArgb)
Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges. Note: if you use it on images without transparency, all colors will be replaced with a single one.
replaceNonTransparentColors
in class RasterImage
newColorArgb
- New color ARGB value to replace non transparent colors with.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.