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: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

GMImage.Stegano

Add a digital watermark to the image (based on second image)

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

Parameters

Parameter Description Example
ImageRef The image reference number. $imageRef
watermark The image reference number. $otherRef

Result

Returns "OK" on success.

Description

Add a digital watermark to the image (based on second image)
Use SteganoImage() to hide a digital watermark within the image. Recover the hidden watermark later to prove that the authenticity of an image. Offset defines the start position within the image to hide the watermark.

Warning: This works in 16bit per pixel mode, so the hidden picture is gone if saving as 8 bit picture.

Examples

Stegano example:

# Load both pictures as reference
Set Variable [ $BigImageRef ; Value: MBS("GMImage.NewFromContainer"; Combine Pictures::BigImage) ]
Set Variable [ $SmallImageRef ; Value: MBS("GMImage.NewFromContainer"; Combine Pictures::SmallImage) ]
# Add second picture as hidden picture
Set Variable [ $Error ; Value: MBS( "GMImage.Stegano"; $BigImageRef; $SmallImageRef) ]
Set Variable [ $Error ; Value: MBS( "GMImage.SetQuality"; $BigImageRef; 100 ) ]
# Write to container and free references
Set Field [ Combine Pictures::Result ; MBS( "GMImage.WriteToPNGContainer"; $BigImageRef ) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$BigImageRef) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$SmallImageRef) ]

See also

Created 18th August 2014, last changed 9th November 2020


GMImage.Spread - GMImage.Stereo

Feedback: Report problem or ask question.