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/c8aaba5d-2322-45f9-aecd-1140fc5ba972"]
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/f32aa642-6826-4982-8f46-7349b48b66aa"]
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/0a34e036-871b-4485-b28c-eb8fa3513ef2"]
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