ImageGear .NET v25.2 - Updated
ImageGear.Processing.Advanced Assembly / ImageGear.FreqIP Namespace / ImGearComplexObject Class / ToImage Method / ToImage(ImGearCoObjConvType) Method
Conversion type used to convert the object to ImageGear.Core.ImGearPage class. See ImGearCoObjConvType enumeration.




In This Topic
    ToImage(ImGearCoObjConvType) Method
    In This Topic
    Converts a complex object to an ImageGear.Core.ImGearPage class object, using the conversion type specified by parameter conversionType.
    Syntax
    'Declaration
     
    Public Overloads Function ToImage( _
       ByVal conversionType As ImGearCoObjConvType _
    ) As ImGearPage
    'Usage
     
    Dim instance As ImGearComplexObject
    Dim conversionType As ImGearCoObjConvType
    Dim value As ImGearPage
     
    value = instance.ToImage(conversionType)

    Parameters

    conversionType
    Conversion type used to convert the object to ImageGear.Core.ImGearPage class. See ImGearCoObjConvType enumeration.

    Return Value

    Remarks
    This method converts a complex object to an ImageGear.Core.ImGearPage class object, using the conversion type specified by parameter conversionType. A complex object should be converted to ImageGear.Core.ImGearPage class only for display purposes; otherwise, it should remain in its original format to retain the data accuracy.

    As an ImGearComplexObject class object contains both real and imaginary data, we need firstly to combine these two data sets into one in order to store the result in an ImageGear.Core.ImGearPage class object, using the option specified by the parameter conversionType. Options available include REAL, IMAGINARY, MAGNITUDE, etc. Please see ImGearCoObjConvType enumeration.

    The dimensions of the converted ImageGear.Core.ImGearPage class object are determined by those of the complex object, with width and height being the same. The depth of the ImageGear.Core.ImGearPage class object can be 8, 16 or 32, depending on the image size. If the image size is less than or equal to (1 << 8), then the depth will be 8bit; less than or equal to (1 << 16), then 16bit; otherwise, the depth will be 32bit. Of course, the ImageGear.Core.ImGearPage class object will only have one channel.

    Once the bit depth is determined, data are then scaled linearly to occupy the entire range of that bit depth and copied to the buffer of ImageGear.Core.ImGearPage class.

    See Also