Export (0) Print
Expand All

ImageAttributes Functions

Windows GDI+ exposes a flat API that consists of about 600 functions, which are implemented in Gdiplus.dll and declared in Gdiplusflat.h. The functions in the GDI+ flat API are wrapped by a collection of about 40 C++ classes. It is recommended that you do not directly call the functions in the flat API. Whenever you make calls to GDI+, you should do so by calling the methods and functions provided by the C++ wrappers. Microsoft Product Support Services will not provide support for code that calls the flat API directly. For more information on using these wrapper methods, see GDI+ Flat API.

The following flat API functions are wrapped by the ImageAttributes C++ class.

ImageAttributes Functions and Corresponding Wrapper Methods

Flat functionWrapper methodRemarks

GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)

ImageAttributes::ImageAttributes() Creates an ImageAttributes object.

GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr, GpImageAttributes **cloneImageattr)

ImageAttributes* ImageAttributes::Clone() const Makes a copy of this ImageAttributes object.

GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)

ImageAttributes::~ImageAttributes() Releases resources used by the ImageAttributes object.

GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageattr, ColorAdjustType type)

Status ImageAttributes::SetToIdentity( IN ColorAdjustType type = ColorAdjustTypeDefault ) Sets the color-adjustment matrix of a specified category to identity matrix.

GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageattr, ColorAdjustType type)

Status ImageAttributes::Reset( IN ColorAdjustType type = ColorAdjustTypeDefault ) Sets the color-adjustment matrix of a specified category to identity matrix.

GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix, GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags flags)

Status ImageAttributes::SetColorMatrix( IN const ColorMatrix *colorMatrix, IN ColorMatrixFlags mode = ColorMatrixFlagsDefault, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearColorMatrix(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the color-adjustment matrix for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate color adjustment is enabled for the category specified by the type parameter. ImageAttributes::SetColorMatrix sets enableFlag to TRUE, and ImageAttributes::ClearColorMatrix sets enableFlag to FALSE.

Clears the color-adjustment matrix for a specified category. The grayMatrix parameter specifies a matrix to be used for adjusting gray shades when the value of the flags parameter is ColorMatrixFlagsAltGray.

GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL threshold)

Status ImageAttributes::SetThreshold( IN REAL threshold, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearThreshold(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the threshold (transparency range) for a specified category.

The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate threshold is enabled for the category specified by the type parameter. ImageAttributes::SetThreshold sets enableFlag to TRUE, and ImageAttributes::ClearThreshold sets enableFlag to FALSE.

Clears the threshold value for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL gamma)

Status ImageAttributes::SetGamma(IN REAL gamma, IN ColorAdjustType type = ColorAdjustTypeDefault)

Status ImageAttributes::ClearGamma(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the gamma value for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate gamma is enabled for the category specified by the type parameter. ImageAttributes::SetGamma sets enableFlag to TRUE, and ImageAttributes::ClearGamma sets enableFlag to FALSE.

Disables gamma correction for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag)

Status ImageAttributes::SetNoOp( IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearNoOp(IN ColorAdjustType type = ColorAdjustTypeDefault)

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 ImageAttributes::SetNoOp method . The enableFlag parameter in the flat function is a Boolean value that specifies whether a color adjustment is enabled for the category specified by the type parameter. ImageAttributes::SetNoOp sets enableFlag to TRUE, and ImageAttributes::ClearNoOp sets enableFlag to FALSE.

Clears the NoOp setting for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)

Status ImageAttributes::SetColorKey( IN const Color& colorLow, IN const Color& colorHigh, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearColorKey(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the color key (transparency range) for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate transparency range is enabled for the category specified by the type parameter. ImageAttributes::SetColorKey sets enableFlag to TRUE, and ImageAttributes::ClearColorKey sets enableFlag to FALSE.

Clears the color key (transparency range) for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)

Status ImageAttributes::SetOutputChannel( IN ColorChannelFlags channelFlags, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearOutputChannel(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the cyan-magenta-yellow-black (CMYK) output channel for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate output channel is enabled for the category specified by the type parameter. ImageAttributes::SetOutputChannel sets enableFlag to TRUE, and ImageAttributes::ClearOutputChannel sets enableFlag to FALSE.

Clears the cyan-magenta-yellow-black (CMYK) output channel setting for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST WCHAR *colorProfileFilename)

Status ImageAttributes::SetOutputChannelColorProfile( IN const WCHAR *colorProfileFilename, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearOutputChannelColorProfile(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the output channel color-profile file for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate output channel color profile is enabled for the category specified by the type parameter. ImageAttributes::SetOutputChannelColorProfile sets enableFlag to TRUE, and ImageAttributes::ClearOutputChannelColorProfile sets enableFlag to FALSE.

Clears the output channel color profile setting for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)

Status ImageAttributes::SetRemapTable( IN UINT mapSize, IN const ColorMap *map, IN ColorAdjustType type = ColorAdjustTypeDefault )

Status ImageAttributes::ClearRemapTable(IN ColorAdjustType type = ColorAdjustTypeDefault)

Sets the color-remap table for a specified category. The enableFlag parameter in the flat function is a Boolean value that specifies whether a separate color remap table is enabled for the category specified by the type parameter. ImageAttributes::SetRemapTable sets enableFlag to TRUE, and ImageAttributes::ClearRemapTable sets enableFlag to FALSE.

Clears the color-remap table for a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp )

Status ImageAttributes::SetWrapMode(IN WrapMode wrap, IN const Color& color = Color(), IN BOOL clamp = FALSE)

Sets the wrap mode of this ImageAttributes object

GpStatus WINGDIPAPI GdipSetImageAttributesICMMode(GpImageAttributes *imageAttr, BOOL on )

Not called by wrapper methods.

This function sets an internal state variable to the value specified by the on parameter. If this value is TRUE, Image Color Management (ICM) is used for all color adjustment. If the value is FALSE, ICM is not used.

GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes *imageAttr, ColorPalette * colorPalette, ColorAdjustType colorAdjustType )

Status ImageAttributes::GetAdjustedPalette(IN OUT ColorPalette* colorPalette, IN ColorAdjustType colorAdjustType) const

Adjusts the colors in a palette according to the adjustment settings of a specified category.

GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes *imageattr, BOOL enableFlag)

Not called by wrapper methods.

Sets or clears the CachedBackground member of a specified GpImageAttributes object. GDI+ does not use the CachedBackground member, so calling this function has no effect. The imageattr parameter specifies the GpImageAttributes object. The enableFlag parameter specifies whether the CachedBackground member is set (TRUE) or cleared (FALSE).

 

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft