Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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 |
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
- GMImage.Free
- GMImage.Negate
- GMImage.New
- GMImage.NewFromContainer
- GMImage.Segment
- GMImage.SetFont
- GMImage.SetPage
- GMImage.SetQuality
- GMImage.Stereo
- GMImage.WriteToPNGContainer
This function checks for a license.
Created 18th August 2014, last changed 9th November 2020
