Description

The McImageType object. This object is used to define an image's color mode, pixel format, and memory layout.

Remarks

This object is just a simple structure that describes the Pixels within an image. It also contains a few useful utiliy functions for copying and comparing different color modes. A newly created McImageType object's properties default to 8 bit integer monochrome flat array, 1 channel.

Note that all of the properties support an “Any...” value. This allows the user to indicate “don't care” conditions, or as a mechanism for querying. For example, if the user simply wants to force an image to be 8 bits per channel, regardless of the other properties, the user calls McImageType.Initialize (AnyArray, McInteger, AnyInterp, NBITS_8, 0). This McImageType object would then be used as a parameter to an McPixelPointer to process the image as if it truely were 8 bits.

Members

Methods
DuplicateGivenType

Duplicates this type or a given VARIANT type into a new McImageType instance

GetDoubleCastingLUT

A special look up table used to aid conversion of one Image Type into another.

Initialize

Defines the charactereistics of an image, including color model and memory layout.

IsCastLegalValidation, is it possible to cast to the specified type
IsCastToTypeLegalValidation, is it possible to cast to the specified ImageType
MakeCompatibleWith

Replace don't care values in the current McImageType object with corresponding values from the psrcIMcImageType object.

MakeDuplicateOf

Copies the properties of the ImageType object referenced by psrcIMcImageType into the current object.

NameOfTypeOrChannel

Returns a string giving the name of the type's interpretation or of a channel

PutDoubleCastingLUTmethod PutDoubleCastingLUT

Properties
BitsPerChannelRead-write property

A property used to describe the number of bits per channel, or bands.

ByteCastingLUTRead-write propertyproperty ByteCastingLUT
BytesPerChannelRead-only property

A read only property used to describe the size of each channel of a pixel.

ColorMapRead-write property

The ColorMap property can be used before creation of an indexed color image to specify the color map for the new image. It is also used by the Image object to support getting the color map (palette) of an image. Since the image's type is a COPY and all changes to it are ignored, there would be no way to change an image's color map (palette) without this. The color map supplied should be an array of COLORREFs (DWORDS).

Note that the color map (palette) is a very different entity than the “casting palette” which is only used for conversion TO an indexed color image.

Note also that the palette supplied could be a different size than the number of colors in the image, especially for 12- or 16-bit images. The image will deal with this when asked for the extended LUT (for display).

ColorMapLengthRead-only property

Used by the pixel buffer to support getting the length color map (palette) of an image (see comments in ColorMap). Returns 0 (zero) if the color map has not been set, or if the image is not an indexed color image.

InterpretationRead-write property

A property used to attach an image to the viewer.

IsEquivalentRead-only property

Compares two McImageType objects.

IsValidRead-only property

Veifies the McImageType object contains a valid combination of property values..

LuminanceChannelRead-only property

A read only property used to indicate which one channel (if any) encodes luminance data.

MaxCastingLuminanceRead-write property

Used when converting pixel bit depths; determines scaling factors.

MinCastingLuminanceRead-write property

Used when converting pixel bit depths; determines scaling factors.

NumberOfChannelsRead-write property

The number of channels, or bands, per pixel.

OrganizationRead-write property

A property that describes the memory layout of an image.

PaletteCastingMethodRead-write property

Selects a casting option for the image when converting to an Indexed palette.

PixelDataTypeRead-write property

A property used to indicate wheter pixel values are integer or floating point.

RangeMaxRead-write property

Used to change the default maximum value expected within the image.

RangeMinRead-write property

Used to change the default minimum value expected within the image.