On-line Tutorial

If the following screen captures do not fit in the frame due to the resolution of your monitor, then click here to switch to frameless mode, instead of scrolling left and right. Afterwards use the Back button of the browser to come back here.

 


Notes:


 

Embedding data into an image

Select the imbedding function

Select the embedding function on the initial window

Specify the JPEG basis file

Specify and validate the JPEG file to be used as the basis (to be modified by the source data) in the JPEG basis file area of the window by entering the file name, or selecting it in a browse dialog

Validate the JPEG basis file

The Validate button became enabled. The validation consists of the formal verification and evaluation of the image's embedding capacity.

The text appearing after validation shows the maximum amount of data can be embedded in the JPEG image at what "cost in picture quality", i.e. maximum distortion of the picture when embedding that amount of data. This calculation assumes, that every bit involved in the embedding process will actually be changed, while in fact statistically only about half of the involved bits undergo a change. The actually embedded amount of data should not come close to this limit, since it would make the distortion effect easily noticable.
Result of the validation

maximum 36696 bytes can be embedded in this JPEG image; the maximal picture distortion would be 43.72% when embedding that amount of data

Select the source data

The data to embed has to be specified; use the Source of data to embed group of controls

The data to be embedded can be entered and/or pasted in the edit dialog, if the Edit button will be clicked on (see the edit/view dialog).

Alternatively, by clicking on the File button, the Browse button and the box for the file name will be enabled and a file can be selected as the source of data.
Specify the source file

The source file can be specified directly by entering its name, or a browse dialog can be started for the file selection

Validate the source file

When Validateing the source against the basis, the file will be read and it's length compared to the capacity of the JPEG basis

Result of the source file validation

The response contains the distortion, which can be caused by embedding this data in the image data. In this example the maximum distortion is 13.19%, caused by embedding 25009 bytes

At this point the data may be edited and validated again. The original source file will not be effected by the changes made while editing. The finalized (or unchanged) data can now be embedded in the basis by clicking on the Embed button; this will start a subdialog for entering the passphrase:
Enter the passphrase

The same passphrase has to be entered in two fields to verify that no typo has been made.

The passphrase has been entered

Initially an asterisk appears for each character. The copy/paste functions do not work on these fields in this state

Show the passphrase

By selecting Show typing, the entered characters become visible; the passphrases can be verified visually.

In this state the copy/paste functions can be used. However, it is a very bad practice to enter a passphrase in one of the fields and copy/paste it in the other field, for it defeats the purpose of the repetition (any typo made in the first field will be repeated in the second one)

By clicking on OK the passphrase (no matter if actually shown or not) will be verified and if it is correct, the actual embedding takes place:
Source file imbedded

The amount of embedded data and the actual distortion it caused in the image is shown (here 6.59%). This is usually close to the half of the maximum distortion indicated before embedding (in this example it was 13.19%).

Specify the target file

The modified image can be saved into a file; use the JPEG target file group of controls.

Saved the target file

The target file can be specified directly by entering its name, or a browse dialog can be started for the file selection.
By clicking on the Save button the file will be saved

The target file has been saved

Note, that the resulting file is smaller (153933 bytes) than the original was (158641 bytes). This is not always so, and it has nothing to do with the quality of the image

Now the resulting image can be verified by a JPEG viewer in order to determine if the distortion is acceptable. By clicking on the RESTART button the dialog can be restarted. Note that the embedded data remains in storage, it can be further edited and embedded in another image.

 

Extracting embedded data

Select the imbedding function

Select the extracting function on the initial window

Specify the JPEG basis file

Specify and validate the JPEG file, which contains the embedded data in the JPEG basis file area of the window by entering the file name, or selecting it in a browse dialog

Extract the imbedded data

As soon as a file name has been selected or entered, the Extract button becomes enabled

By clicking on the Extract button, the extraction process begins by asking for the passphrase:
Exter the passphrase

Enter the password exactly as it has been given when embedding

The passphrase has been entered

Initially an asterisk appears for each character. The copy/paste functions do not work on this field in this state

Show the passphrase

By selecting Show typing, the entered characters become visible; the passphrases can be verified visually.

By clicking on OK the passphrase will be verified and if it is formally correct, the extraction takes place:
Data extracted

The response shows the amount of extracted data, here 25009 bytes

If a wrong passphrase was entered, RESTART the processing or change any character in the JPEG basis file name and change it back; the Extract button becomes enabled again. This can happen already directly after Extract, when the length of extraction indicates, that the passphrase can't be correct (or when displaying the extracted data shows something unexpected).
Wrong passphrase entered

If the following passphrase will be entered (note that "the" is missing between "for" and "online"),

Extracted data length unexpected

then already the length of extracted data shows, that the extraction was not really successful

However, the person extracting the data does not always know the length of the embedded data. Let's take a look at the extracted data in the Edit window by clicking on the Display button:
Extracted data unexpected

This does not look like text, what we have expected. The correct passphrase can be specified by restarting the extraction process

The extracted data can be viewed and changed in the Edit dialog, see the edit/view dialog, and/or it can be saved in a file with or without having viewed or changed it before.
Specify the extract target file

Clicking on File enables the Browse button and the file name field

Save the target file

The file can be specified directly by entering its name, or a browse dialog can be started for the file selection

Target file saved

By clicking on the Save button, the file will be saved

The extraction process is now finished. By clicking on the RESTART button, the dialog will be restarted. Note that the extracted data can still be viewed; it can be edited and used as source data in the next embedding process.

 

The edit/view dialog

The edit/view dialog can be started at any point during the embedding or extraction dialog. This dialog facilitates Entering/changing data occurs in a temporary storage. When leaving the edit dialog with clicking on OK, the data from this storage will be kept; by clicking on CANCEL or pressing Escape the temporary data will be discarded.

The so-called Rich Text Editor will be used for entering/viewing/changing the data. It has some formatting capabilities, comparable to word processors but in limited extent. Microsoft's Word for Windows as well as WordPad support the rich text format; the default file name extention for such file is "rtf".

This edit dialog does not aim at substituting full-fledged word processing. If sophisticated text formatting is required, it should be done before embedding respectively after extraction. However, the edit dialog provides a simple way to enter and view data.

The editing window is resizable: it can be stretched or shrunk in any direction by dragging a side or a corner of the window; it can be minimized, maximized and restored to the previous size.

Changing between rich edit format and text format

When starting out with the edit/view dialog, the check box Rich Edit Format is not checked. The meaning of this is, that any data, which has been extracted or read from a source file will be displayed without looking for rich text formatting information. This setting is suitable for viewing plain text or anything else, what is not in rich text format.
JPEG file in Edit

It is appearant, that a JPEG image in JFIF format has been embedded (or is about being embedded) into the basis image

When displaying this content in rich text mode, which is not conform with rich text format, an empty edit box would appear.

Now let's take a look at the appearance of some rich text:
Richtext without Rtf option

The character string {\rtf1\ansi at the very beginning indicates, that the content is in rich text format

Richtext with Rtf option

Checking the box Rich Edit Format lets the editor interpret the formatting information

Richtext formatting info lost

Switching back to non-rich edit format eliminates the formatting information; now only the plain text will be displayed

Care has to be exercised not to inadvertantly save the data, which has been changed by switching back and forth between rich text and plain text format. (The program will ask for confirmation before storing the changed data.)

When pasting rich text from somewhere in the edit box, it will be displayed in formatted mode independently on the current setting. However, when changing the mode from rich text to plain text, the formatting information will be eliminated.

Due to limitations of this rich edit format support, when loading a file or extracted data or pasting a rich text in the exit box, some changes may be carried out. When saving the data, these unintended changes will become permanent. This can be avoided by clicking on CANCEL instead of OK.

Font selection

A rich text usually contains font specifications as well. Even several different fonts (different type-faces, styles and sizes, etc.) may be used in the text; there is no point in changing font. However, in plain-text mode one can choose between a proportional font (actually "MS Sans Serif") and a fixed-pitch font (actually "Courier New"). In plain-text mode the font size can be chosen as well. Note, that the font type and size chosen this way does not become part of the data; it changes only the view, as opposed to the font characteristics of rich text.

 

Starting the program

CryptoBola JPEG can be started in Windows' Run dialog, but that's a cumbersome way. It can be started from Windows' Explorer by double-clicking on the program name. However, that too is a slow method, as one has to locate the program each time.

There is a much better way to start the program: by creating a shortcut to it (right-click on it's name in Explorer and select the Create Shortcut option), and then moving the shortcut to the desktop or in the taskbar. This not only makes starting the program easier, but it offers a way of passing parameters, thereby simplifying recurring tasks.

When right-clicking on a shortcut and selecting Properties, following window appears:

Shortcut Properties Dialog

The field Target contains the location and name of the program (not to be mixed up with the name of the shortcut). In the above example, it is C:\Program Files\cbjpegV2.exe (it has to stay between quotation marks, because this folder name contains a space).

If this is the only parameter, then the dialog will be started with the function selection and empty JPEG basis file name.

One or more parameters may be specified after at least one space following the program name. The parameters must be separated from each other by at least one space and/or comma; their sequence is of no relevance, except that the basis file specification has to follow the -b parameter (these too have to be separated by at least one space and/or comma).

-i or /i requests, that the dialog be started with the embedding function.
-x or /x requests, that the dialog be started with the extraction function.
-b or /b indicates, that a file specification of the JPEG basis file is the next parameter. The file specification may contain device and/or path name, but it must end with the file name. In case there is a space or comma in the specification, it has to be put between quotation marks.

The Start in field too is important: it specifies the default folder for all files accessed during this program run. If the "candidate" JPEG files are kept in a folder and that folder is specified in this field, selecting a JPEG file will be simple: only the file name has to be specified, the drive and path can be ommitted.


Home Modified: 2005-03-28