Description

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

Return Type

None  

Syntax

object.MakeCompatibleWith psrcIMcImageType

The MakeCompatibleWith Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McImageType.
psrcIMcImageTypeRequired. A McImageType object.

McImageType* : Pointer to a source McImageType object used to retrieve values.

Remarks

This method replaces the “Any...” properties found in the current McImageType object with equivalent properties from the provided McImageType object. No testing is done to verify the resulting McImageType object is valid. If desired, use the IsValid() method to verify results.

As an example use of this method, assume an image processing algorithm could only process floating point images. Create an McImageType object with PixelDataType set to mcpdtFloat and BitsPerChannel set to mcbpc32Bits. The other properties should be set to “Any...”. A call to this method, with psrcIMcImageType pointing to the original McImageType, fills in the “Any...” properties. The algorithm can then establish an McPixelPointer to the image and process as if the image really were of type mcpdtFloat.

This only works on a new McImageType, it doesn't work on McImageType's attached to images, which are read-only.

Exceptions

E_INVALIDARG -- psrcIMcImageType is NULL.