public final class ImageAttributes extends Object implements com.aspose.ms.System.IDisposable
Contains information about how bitmap and metafile colors are manipulated during rendering.
| Constructor and Description |
|---|
ImageAttributes()
Initializes a new instance of the
ImageAttributes class. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBrushRemapTable()
Clears the brush color-remap table of this
ImageAttributes object. |
void |
clearColorKey()
Clears the color key (transparency range) for the default category.
|
void |
clearColorKey(int type)
Clears the color key (transparency range) for a specified category.
|
void |
clearColorMatrix()
Clears the color-adjustment matrix for the default category.
|
void |
clearColorMatrix(int type)
Clears the color-adjustment matrix for a specified category.
|
void |
clearGamma()
Disables gamma correction for the default category.
|
void |
clearGamma(int type)
Disables gamma correction for a specified category.
|
void |
clearNoOp()
Clears the NoOp setting for the default category.
|
void |
clearNoOp(int type)
Clears the NoOp setting for a specified category.
|
void |
clearOutputChannel()
Clears the CMYK (cyan-magenta-yellow-black) output channel setting for the default category.
|
void |
clearOutputChannel(int type)
Clears the (cyan-magenta-yellow-black) output channel setting for a specified category.
|
void |
clearOutputChannelColorProfile()
Clears the output channel color profile setting for the default category.
|
void |
clearOutputChannelColorProfile(int type)
Clears the output channel color profile setting for a specified category.
|
void |
clearRemapTable()
Clears the color-remap table for the default category.
|
void |
clearRemapTable(int type)
Clears the color-remap table for a specified category.
|
void |
clearThreshold()
Clears the threshold value for the default category.
|
void |
clearThreshold(int type)
Clears the threshold value for a specified category.
|
Object |
deepClone()
Creates an exact copy of this
ImageAttributes object. |
void |
dispose()
Releases all resources used by this
ImageAttributes object. |
void |
getAdjustedPalette(ColorPalette palette,
int type)
Adjusts the colors in a palette according to the adjustment settings of a specified category.
|
void |
setBrushRemapTable(ColorMap[] map)
Sets the color-remap table for the brush category.
|
void |
setColorKey(Color colorLow,
Color colorHigh)
Sets the color key for the default category.
|
void |
setColorKey(Color colorLow,
Color colorHigh,
int type)
Sets the color key (transparency range) for a specified category.
|
void |
setColorMatrices(ColorMatrix newColorMatrix,
ColorMatrix grayMatrix)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.
|
void |
setColorMatrices(ColorMatrix newColorMatrix,
ColorMatrix grayMatrix,
int flags)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.
|
void |
setColorMatrices(ColorMatrix newColorMatrix,
ColorMatrix grayMatrix,
int mode,
int type)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for a specified category.
|
void |
setColorMatrix(ColorMatrix newColorMatrix)
Sets the color-adjustment matrix for the default category.
|
void |
setColorMatrix(ColorMatrix newColorMatrix,
int flags)
Sets the color-adjustment matrix for the default category.
|
void |
setColorMatrix(ColorMatrix newColorMatrix,
int mode,
int type)
Sets the color-adjustment matrix for a specified category.
|
void |
setGamma(float gamma)
Sets the gamma value for the default category.
|
void |
setGamma(float gamma,
int type)
Sets the gamma value for a specified category.
|
void |
setNoOp()
Turns off color adjustment for the default category.
|
void |
setNoOp(int type)
Turns off color adjustment for a specified category.
|
void |
setOutputChannel(int flags)
Sets the CMYK (cyan-magenta-yellow-black) output channel for the default category.
|
void |
setOutputChannel(int flags,
int type)
Sets the CMYK (cyan-magenta-yellow-black) output channel for a specified category.
|
void |
setOutputChannelColorProfile(String colorProfileFilename)
Sets the output channel color-profile file for the default category.
|
void |
setOutputChannelColorProfile(String colorProfileFilename,
int type)
Sets the output channel color-profile file for a specified category.
|
void |
setRemapTable(ColorMap[] map)
Sets the color-remap table for the default category.
|
void |
setRemapTable(ColorMap[] map,
int type)
Sets the color-remap table for a specified category.
|
void |
setThreshold(float threshold)
Sets the threshold (transparency range) for the default category.
|
void |
setThreshold(float threshold,
int type)
Sets the threshold (transparency range) for a specified category.
|
void |
setWrapMode(int mode)
Sets the wrap mode that is used to decide how to tile a texture across a shape, or at shape boundaries.
|
void |
setWrapMode(int mode,
Color color)
Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries.
|
void |
setWrapMode(int mode,
Color color,
boolean clamp)
Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries.
|
public ImageAttributes()
Initializes a new instance of the ImageAttributes class.
public void dispose()
Releases all resources used by this ImageAttributes object.
dispose in interface com.aspose.ms.System.IDisposablepublic Object deepClone()
Creates an exact copy of this ImageAttributes object.
ImageAttributes object this class creates, cast as an object.public void setColorMatrix(ColorMatrix newColorMatrix)
Sets the color-adjustment matrix for the default category.
newColorMatrix - The color-adjustment matrix.public void setColorMatrix(ColorMatrix newColorMatrix, int flags)
Sets the color-adjustment matrix for the default category.
newColorMatrix - The color-adjustment matrix.flags - An element of ColorMatrixFlag that specifies the type of image and color
that will be affected by the color-adjustment matrix.public void setColorMatrix(ColorMatrix newColorMatrix, int mode, int type)
Sets the color-adjustment matrix for a specified category.
newColorMatrix - The color-adjustment matrix.mode - An element of ColorMatrixFlag that specifies the type of image and color
that will be affected by the color-adjustment matrix.type - An element of ColorAdjustType that specifies the category for which
the color-adjustment matrix is set.public void clearColorMatrix()
Clears the color-adjustment matrix for the default category.
public void clearColorMatrix(int type)
Clears the color-adjustment matrix for a specified category.
type - An element of ColorAdjustType that specifies the category
for which the color-adjustment matrix is cleared.public void setColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.
newColorMatrix - The color-adjustment matrix.grayMatrix - The grayscale-adjustment matrix.public void setColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix, int flags)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for the default category.
newColorMatrix - The color-adjustment matrix.grayMatrix - The grayscale-adjustment matrix.flags - An element of ColorMatrixFlag that specifies the type of image
and color that will be affected by the color-adjustment and grayscale-adjustment matrices.public void setColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix, int mode, int type)
Sets the color-adjustment matrix and the grayscale-adjustment matrix for a specified category.
newColorMatrix - The color-adjustment matrix.grayMatrix - The grayscale-adjustment matrix.mode - An element of ColorMatrixFlag that specifies the type of image and color
that will be affected by the color-adjustment and grayscale-adjustment matrices.type - An element of ColorAdjustType that specifies the category
for which the color-adjustment and grayscale-adjustment matrices are set.public void setThreshold(float threshold)
Sets the threshold (transparency range) for the default category.
threshold - A real number that specifies the threshold value.public void setThreshold(float threshold,
int type)
Sets the threshold (transparency range) for a specified category.
threshold - A threshold value from 0.0 to 1.0 that is used as a breakpoint to sort colors
that will be mapped to either a maximum or a minimum value.type - An element of ColorAdjustType that specifies the category for which
the color threshold is set.public void clearThreshold()
Clears the threshold value for the default category.
public void clearThreshold(int type)
Clears the threshold value for a specified category.
type - An element of ColorAdjustType that specifies the category for which
the threshold is cleared.public void setGamma(float gamma)
Sets the gamma value for the default category.
gamma - The gamma correction value.public void setGamma(float gamma,
int type)
Sets the gamma value for a specified category.
gamma - The gamma correction value.type - An element of the ColorAdjustType enumeration that specifies
the category for which the gamma value is set.public void clearGamma()
Disables gamma correction for the default category.
public void clearGamma(int type)
Disables gamma correction for a specified category.
type - An element of ColorAdjustType that specifies the category
for which gamma correction is disabled.public void setNoOp()
Turns off color adjustment for the default category.
You can call the ImageAttributes.clearNoOp() method to reinstate
the color-adjustment settings that were in place before the call
to the ImageAttributes.setNoOp() method.
public void setNoOp(int type)
Turns off color adjustment for a specified category. You can call the ImageAttributes.clearNoOp()
method to reinstate the color-adjustment settings that were in place before the call
to the ImageAttributes.setNoOp() method.
type - An element of ColorAdjustType that specifies the category for which color
correction is turned off.public void clearNoOp()
Clears the NoOp setting for the default category.
public void clearNoOp(int type)
Clears the NoOp setting for a specified category.
type - An element of ColorAdjustType that specifies the category for which
the NoOp setting is cleared.public void setColorKey(Color colorLow, Color colorHigh)
Sets the color key for the default category.
colorLow - The low color-key value.colorHigh - The high color-key value.public void setColorKey(Color colorLow, Color colorHigh, int type)
Sets the color key (transparency range) for a specified category.
colorLow - The low color-key value.colorHigh - The high color-key value.type - An element of ColorAdjustType that specifies
the category for which the color key is set.public void clearColorKey()
Clears the color key (transparency range) for the default category.
public void clearColorKey(int type)
Clears the color key (transparency range) for a specified category.
type - An element of ColorAdjustType that specifies the category
for which the color key is cleared.public void setOutputChannel(int flags)
Sets the CMYK (cyan-magenta-yellow-black) output channel for the default category.
flags - An element of ColorChannelFlag that specifies the output channel.public void setOutputChannel(int flags,
int type)
Sets the CMYK (cyan-magenta-yellow-black) output channel for a specified category.
flags - An element of ColorChannelFlag that specifies the output channel.type - An element of ColorAdjustType that specifies the category for which
the output channel is set.public void clearOutputChannel()
Clears the CMYK (cyan-magenta-yellow-black) output channel setting for the default category.
public void clearOutputChannel(int type)
Clears the (cyan-magenta-yellow-black) output channel setting for a specified category.
type - An element of ColorAdjustType that specifies the category for which
the output channel setting is cleared.public void setOutputChannelColorProfile(String colorProfileFilename)
Sets the output channel color-profile file for the default category.
colorProfileFilename - The path name of a color-profile file.
If the color-profile file is in the %SystemRoot%\System32\Spool\Drivers\Color directory,
this parameter can be the file name. Otherwise, this parameter must be the fully qualified path name.public void setOutputChannelColorProfile(String colorProfileFilename, int type)
Sets the output channel color-profile file for a specified category.
colorProfileFilename - The path name of a color-profile file.
If the color-profile file is in the %SystemRoot%\System32\Spool\Drivers\Color directory,
this parameter can be the file name. Otherwise, this parameter must be the fully qualified path name.type - An element of ColorAdjustType that specifies the category
for which the output channel color-profile file is set.public void clearOutputChannelColorProfile()
Clears the output channel color profile setting for the default category.
public void clearOutputChannelColorProfile(int type)
Clears the output channel color profile setting for a specified category.
type - An element of ColorAdjustType that specifies the category for which
the output channel profile setting is cleared.public void setRemapTable(ColorMap[] map)
Sets the color-remap table for the default category.
map - An array of color pairs of type ColorMap.
Each color pair contains an existing color (the first value) and the color that it will be mapped to
(the second value).public void setRemapTable(ColorMap[] map, int type)
Sets the color-remap table for a specified category.
map - An array of color pairs of type ColorMap.
Each color pair contains an existing color (the first value) and the color that it will be mapped to
(the second value).type - An element of ColorAdjustType that specifies the category for which
the color-remap table is set.public void clearRemapTable()
Clears the color-remap table for the default category.
public void clearRemapTable(int type)
Clears the color-remap table for a specified category.
type - An element of ColorAdjustType that specifies the category for which the remap
table is cleared.public void setBrushRemapTable(ColorMap[] map)
Sets the color-remap table for the brush category.
map - An array of ColorMap objects.public void clearBrushRemapTable()
Clears the brush color-remap table of this ImageAttributes object.
public void setWrapMode(int mode)
Sets the wrap mode that is used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.
mode - An element of WrapMode that specifies how repeated copies of an image
are used to tile an area.public void setWrapMode(int mode,
Color color)
Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.
mode - An element of WrapMode that specifies how repeated copies of an image
are used to tile an area.color - An Color object that specifies the color of pixels outside of a rendered image.
This color is visible if the mode parameter is set to WrapMode.Clamp and the source rectangle passed
to Graphics.DrawImage is larger than the image itself.public void setWrapMode(int mode,
Color color,
boolean clamp)
Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.
mode - An element of WrapMode that specifies how repeated copies of an image
are used to tile an area.color - A color object that specifies the color of pixels outside of a rendered image.
This color is visible if the mode parameter is set to WrapMode.Clamp and the source rectangle
passed to Graphics.DrawImage is larger than the image itself.clamp - This parameter has no effect. Set it to false.public void getAdjustedPalette(ColorPalette palette, int type)
Adjusts the colors in a palette according to the adjustment settings of a specified category.
palette - A ColorPalette that on input contains the palette to be adjusted,
and on output contains the adjusted palette.type - An element of ColorAdjustType that specifies the category whose adjustment
settings will be applied to the palette.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.