Wolfram Research

Function Repository Resource:

SteganographyExtract

Source Notebook

Extract a message that has been hidden in an image using the resource function SteganographyInsert

Contributed by: Jon McLoone

ResourceFunction["SteganographyExtract"][img]

extracts a message hidden in image img.

Details and Options

Only messages hidden using the resource function SteganographyInsert can be extracted.

Examples

Basic Examples

Hide a message within an image:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/6aa81cde-052b-41e9-850b-14d1397e9570"]
Out[1]=

Recover the message using the following:

In[2]:=
ResourceFunction["SteganographyExtract"][img]
Out[2]=

Scope

You can specify the text encoding of the message for efficient representation. This calls ExportString on the message first:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/cf3c1fbd-c2c6-462f-943f-6d42c2b42a1e"]
Out[3]=

The encoding method is automatically detected and reversed during extraction:

In[4]:=
ResourceFunction["SteganographyExtract"][img]
Out[4]=

Possible Issues

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]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/a1122367-a7cd-4fc6-b664-5004d9e14bc1"]
Out[5]=

If you use an encoding method, some information may be lost during the ExportString and ImportString processes.

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

Related Resources

License Information