Name
ImageAttributes
Synopsis
This class is used to set various color-manipulation effects when
rendering on a graphics surface. You can pass an
ImageAttributes
object to the
System.Drawing.Graphics.DrawImage()
and
System.Drawing.Graphics.EnumerateMetafile()
There are two methods to remap colors using a
ColorMap
: SetBrushRemapTable()
and SetRemapTable()
. You can apply a
ColorMatrix
using the SetColorMatrix()
method. If you want to set separate matrixes for the
color and grayscale parts of an image, you can use the
SetColorMatrices()
variant.
SetThreshold()
applies a bi-level threshold to
the image (everything below the threshold is clamped to 0, and
everything above is clamped to the maximum representable value). You
can control the gamma with SetGamma()
.
You can enable basic color keying with SetColorKey()
. This allows you to set a range of colors that will be
rendered as transparent, allowing the background to show through.
The SetOutputChannel()
allows you to limit the
image rendered to one or more of the CMYK channels (as listed in the
ColorChannelFlag
enumeration). This allows you to
perform basic color separations for printing.
SetOutputChannelColorProfile()
allows you to
choose a color-match profile file for the CMYK conversion, to better
match the characteristics of the target output device. Installed
color profiles are found in the
%SystemRoot%\System32\Spool\Drivers\Color\
directory, and the system will look in here for the filename you specify. If the profile file is not ...
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.