Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Add or remove a named profile to/from the image.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
name | The string with the name of the profile. | "IPTC" |
data | The container field value with the embedded profile file. |
Returns "OK" on success.
Remove XMP:
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $imageRef; "XMP"; "" )]
Remove IPTC:
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $imageRef; "IPTC"; "" )]
Remove EXIF:
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $imageRef; "EXIF"; "" )]
Clear all profiles:
Set Variable [ $Image ; Value: MBS("GMImage.NewFromContainer"; MyTable::BMPContainer) ]
# remove metadata
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $Image; "EXIF"; "" )]
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $Image; "IPTC"; "" )]
Set Variable [$Result; Value:MBS( "GMImage.SetProfile"; $Image; "XMP"; "" )]
# write back as JPEG
Set Variable [ $r ; Value: MBS("GMImage.SetQuality";$Image; 90) ]
Set Field [ MyTable::JPEGContainer ; MBS("GMImage.WriteToJPEGContainer"; $Image) ]
Set Variable [ $r ; Value: MBS("GMImage.Release";$Image) ]
Copy IPTC data to a new picture:
# load a picture
Set Variable [ $img ; Value: MBS("GMImage.NewFromContainer"; IPTC::InputImage) ]
# make a new one
Set Variable [ $newImage ; Value: MBS("GMImage.New"; "100x100"; "white") ]
# read metadata and put it on the new picture
Set Variable [ $data ; Value: MBS( "GMImage.GetProfile"; $img; "IPTC" ) ]
Set Variable [ $r ; Value: MBS( "GMImage.SetProfile"; $newImage; "IPTC"; $data ) ]
# write to file
Set Variable [ $r ; Value: MBS( "GMImage.WriteToFile"; $newImage; "/Users/cs/Desktop/Import.jpg" ) ]
# and free memory
Set Variable [ $r ; Value: MBS( "GMImage.Release"; $newImage) ]
Set Variable [ $r ; Value: MBS( "GMImage.Release"; $img) ]
This function checks for a license.
Created 18th August 2014, last changed 22nd August 2022