Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Extract a message that has been hidden in an image using the resource function SteganographyInsert
ResourceFunction["SteganographyExtract"][img] extracts a message hidden in image img. |
Hide a message within an image:
In[1]:= |
Out[1]= |
Recover the message using the following:
In[2]:= |
Out[2]= |
You can specify the text encoding of the message for efficient representation. This calls ExportString on the message first:
In[3]:= |
Out[3]= |
The encoding method is automatically detected and reversed during extraction:
In[4]:= |
Out[4]= |
If no message has been hidden, or the image has been corrupted by image compression, the extraction will nearly always fail, but could produce a large string of random characters:
In[5]:= |
Out[5]= |
If you use an encoding method, some information may be lost during the ExportString and ImportString processes.
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License