Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

GMImage.SetICCColorProfile

Sets the ICC color profile.

Component Version macOS Windows Linux Server iOS SDK
GraphicsMagick 2.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "GMImage.SetICCColorProfile"; ImageRef; data )   More

Parameters

Parameter Description Example
ImageRef The image reference number. 1
data a Container field value with an embedded file containing the profile.

Result

Returns "OK" on success.

Description

Sets the ICC color profile.
Supplied via a Blob since GraphicsMagick do not currently support formatting this data structure directly.
If there is not already an ICC color profile, the profile is merely attached to the image without transforming the pixels. If there is already an ICC color profile (the source profile), the pixels are translated according to the source and target profiles, and the existing profile is replaced with the target profile.
Also see GMImage.SetRenderingIntent, which allows specifying the rendering intent if the profile is executed.
Specifications for ICC color profiles and their usage are available from the International Color Consortium for the format of ICC color profiles.

Examples

Removes an existing profile:

MBS("GMImage.SetICCColorPRofile"; $Image; "")

Assigns new profile from container:

MBS("GMImage.SetICCColorPRofile"; $Image; MyTable::ProfileContainer);

Convert to CMYK by setting a new profile:

Set Variable [ $Result ; Value: MBS("GMImage.SetICCColorProfile"; $BigImageRef; Test::CMYKProfle) ]

See also

Release notes

Example Databases

Blog Entries

Created 18th August 2014, last changed 16th January 2023


GMImage.SetGifDisposeMethod - GMImage.SetIPTCProfile