GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / EnableICM Method
Use True to enable color correction, otherwise False.
Example





In This Topic
EnableICM Method (GdPictureImaging)
In This Topic
Specifies if color correction is used for images embedding an ICC profile. False by default. Enables ICM results in automatic pixel transformation while opening image including an ICC profile.
Syntax
'Declaration
 
Public Sub EnableICM( _
   ByVal Enable As Boolean _
) 
public void EnableICM( 
   bool Enable
)
public procedure EnableICM( 
    Enable: Boolean
); 
public function EnableICM( 
   Enable : boolean
);
public: void EnableICM( 
   bool Enable
) 
public:
void EnableICM( 
   bool Enable
) 

Parameters

Enable
Use True to enable color correction, otherwise False.
Remarks
This parameter only affects image subsequently opened from this same GdPictureImaging object.
Example
Applying ICM correction when saving CMYK based image as a tiff image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    string filePath = "image.jpg";
    if (gdpictureImaging.IsCMYKFile(filePath))
    {
        // Enable color correction.
        gdpictureImaging.EnableICM(true);
        int imageID = gdpictureImaging.CreateGdPictureImageFromFile(filePath);
        
        gdpictureImaging.SaveAsTIFF(imageID, "output.tiff", true, TiffCompression.TiffCompressionJPEG, 90);
 
        // Release used resources.
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
}
See Also