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 As Boolean _
)
public void EnableICM(
bool
)
public procedure EnableICM(
: Boolean
);
public function EnableICM(
: boolean
);
public: void EnableICM(
bool
)
public:
void EnableICM(
bool
)
Parameters
- Enable
- Use True to enable color correction, otherwise False.
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);
}
}
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