Wolfram Research

Function Repository Resource:

SteganographyExtract

Source Notebook

Extract a message that has been hidden in an image using ResourceFunction["SteganographyInsert"]

Contributed by: Jon McLoone

ResourceFunction["SteganographyExtract"][img]

extracts a message hidden in image img.

Details and Options

Only messages hidden using ResourceFunction["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/197527aa-243c-4e63-8b0e-94f01e15b1fc"]
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/76969819-e9c6-45b6-825b-e24b935bd6da"]
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/98f00448-6899-4d00-9621-21f4d3a9d9b4"]
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

License Information