You can use a password to hide your files, and only those who know the password use are able to retrieve them - without it, people cannot even be sure there is something hidden in the image.
I hope you enjoy HIP. If you have any doubts, comments, bug reports or suggestions for future versions, please e-mail me at davitf at eml.cc (the address is not written directly to avoid spammers; simply replace at with @). The latest version of this program is available at http://hide-in-picture.sf.net/. If you cannot understand any part of this documentation, I'm sorry; please tell me so that I can improve it.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The full GNU General Public License is in the file COPYING.
NOTE: The Win32Lib library (used by the Windows version) has the following license terms:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
This program is able to read and write GIF files. However, Unisys has patents for the compression algorithm used by these files (LZW) in the United States, United Kingdom, France, Italy, Germany, Canada and Japan; if you are in any of these countries, you are not allowed to use the GIF reading/writing capabilities without obtaining a license from Unisys (I am not a lawyer, so this information may be inaccurate).
Because of patent concerns in some countries regarding GIF files (see Legal warning), the source code for handling these files is not included in the main source package, but in a separate package. Also, there are two binary packages for each supported language: one of them contains binaries with GIF support and the other one contains binaries without this support. If you are in one of the countries where Unisys has patents on LZW, you should use the _nogif binaries and not use the GIF handling source code; otherwise, you may use any of the packages (it is probably better to use the full-featured program).
Source code:
Binaries:
There are binaries (executable files) for all the currently available languages. Each language is represented by a two-letter code in the package name; the package names below have the letters en, for English, and you should replace them by the code for the appropriate language.
All the packages are available from the HIP page, at http://hide-in-picture.sf.net/.
When a file is hidden in a picture that already has something in it, the new file may be written in areas where the previous data was stored (as HIP has no way of knowing that it was already there), so the old file will be erased or corrupted. Also notice that a large file will need more areas to be fully hidden than a small one, so it may be easier to see the modifications in the picture. If you hide a file that is too large, there will be a lot of "noise" in the picture and it will be easy to notice there is something hidden in the picture, even if other people cannot see what is actually hidden in it. For a somewhat more technical explanation about how hiding works, please read How HIP works. Before using HIP to hide important data, please read Security recommendations.
To hide a file inside a picture, use:
hip h source_image input_file [destination_image] [options]
If the destination image name is not specified, the destination image is written on top of the source image.
To retrieve a file from a picture, use:
hip r source_image [output_file] [options]
If the output file name is not specified, the name saved in the picture is used.
To erase a file previously hidden in a picture, use:
hip e source_image [destination_image] [options]
If the destination image name is not specified, the destination image is written on top of the source image.
Options:
-fxxxxxx - file name to write in image
By default, the name of the input file is written in the image. Use this option to specify a different name to write. If you use it without specifying a file name, no name is written.
-pxxxxxx - password to use
When used with the hide or retrieve operations, this option specifies the password to use for hiding/retrieving the file. If you do not use this option, you will be asked to enter a password (recommended). When used with the erase operation, HIP assumes there is a file hidden with the specified password and overwrites only the first bits of the hidden data; if the image contains a file hidden with a different password, it will not be erased correctly.
-thh or -thhhhhh - transparent color index or RGB value
Use this option to set the transparent color for the image. To specify the palette index for the transparent color of an 8-bit image, use two hexadecimal digits (00-FF). To specify the RGB value for the transparent color, use six hexadecimal digits (the first two represent the red component, the next two represent the green one and the last two, the blue one). If you specify the RGB value for the transparent color of an 8-bit image and there is more than one palette entry with that color, the one with the lowest index will be used.
-ex - encryption algorithm
Use this option to choose the encryption algorithm: a for Blowfish (default) or b for Rijndael.
-ix - image format
Use this option to choose the image format for the output file. If the format is not specified, HIP will choose the format based on the file extension; if the extension is not recognized, the file will be saved as a Windows Bitmap (BMP) picture.
-c - write the CRC-32 of the data
Use this option to append a checksum to the data to identify data corruption. This is enabled by default.
-C - do not write the CRC-32 of the data
Use this option if you do not wish to append a checksum to the data; see above.
-h - hide the password characters
If the p option is not used, the program asks the user for the password. Use this option to show *'s (asterisks) instead of the password characters. This is enabled by default.
-H - do not hide the password characters
Use this option to show the password characters while you are typing them.
-v - view file information only
Use this option if you only want to see whether the file fits inside the picture when hiding, or the name and size of the hidden file when retrieving. The destination image or output file is not written.
-q -quiet mode
Use this option if you do not want to see unnecessary messages (such as the file information and status bars). The only things that will be shown are password prompts, confirmation messages and error messages.
-y -answer 'yes' to all confirmation questions
By default, the program asks for confirmation before overwriting a file that already exists. If this option is specified, you will not be asked for confirmation.
Hiding a file
To hide a file inside a picture, select the 'Hide file...' item in the Image menu or click the Hide button, and choose the file you want to hide. You can also drag and drop the file into the picture.An Options window will then appear. In it, you can type the password to use, change the file name which will be written along with the file, choose the encryption algorithm for the file, and say whether you want a checksum to be written along with the file (recommended). Press the Ok button when you are done.
The file will then be hidden in the picture. A progress window will be shown during this process; if you wish to abort it, click the Stop button or close this window. When the process is complete, the window containing the picture will show the modified picture.
Click the Save button or select the 'Save picture' item in the Image menu to save the modified image on top of the original one. If you do not want to overwrite the original picture, click the Save As button or select the 'Save picture as...' item in the menu. Please note that the file format selected in the Save file dialog box does not really have an effect on the format used to save the picture; the file format is selected from the file extension (this is a bug, not a feature; I hope to be able to fix it soon).
Retrieving a file
To retrieve a file hidden inside a picture, click the Retrieve button or select the 'Retrieve file...' item in the Image menu, and wait while HIP converts the pixels in the picture into the data which it will try to read. You can cancel the operation by closing the progress window or clicking the Stop button.Next, an Options window will appear. Type the same password used to hide the picture (remember that passwords are case-sensitive). If it is correct, you will see a Save file dialog where you can change the directory and/or the name of the retrieved file if you wish. When you press the Ok button, the file will be retrieved. During this process, you will see the progress window. If you have read this far, you probably already know how to cancel this operation.
When the progress window disappears, the retrieving process is finished. If the checksum was written with the data and the hidden file has been corrupted, you will see a warning message.
Setting the transparent color
To select a transparent color for the picture, select the 'Transparent color...' item in the Image menu. If the picture contains a palette, you will be asked for the palette index of the transparent color; otherwise, you will be asked for its red-green-blue value.
Getting information about the picture
You can see some information about the picture by selecting the 'Picture information...' item in the Image menu. You will see its file name, its dimensions and number of bits used per pixel, the currently set transparent color and the maximum number of bytes the picture can store. Please note that you cannot hide a file as large as this; some of these bytes will be used to store information about the file (typically, 32 bytes will be used, plus the length of the file name). Remember that, if the file hidden uses too much of the available space, the quality of the picture will be severely reduced.
The bitmap file could not be read because there are errors in it.
xxxxxx contains unsupported features
The bitmap file is of a type not currently supported by HIP. It may be compressed, or not a 8-bit or 24-bit image.
A file name must be specified for retrieving this file
The file name was not saved in the picture, so a file name to save the retrieved file must be specified.
Aborted by user
The user has aborted the execution of the program.
Cannot save a x-bit picture as a xxx file
The chosen image format cannot store pictures with the bit depth of the current image. If this happens, try choosing another format.
Color not found in palette
A RGB value for the transparent color of an 8-bit image was specified, but the color was not found in the palette.
File is too big to be hidden in picture
No need to explain it. Try using a larger picture.
File was hidden with a newer version of HIP
Newer versions of HIP may contain features (such as compression) which are not known by this version. If this happens, get a newer version of the program.
Filesystem error while reading xxxxxx
There was a filesystem problem while the program was reading the file.
Hidden data is corrupted
The program found the data in the image, but there is something wrong with it. Possible causes: a graphics program has corrupted the hidden data, or there has been a transmission or storage error. Anyway, the file is saved, but some or all of it may be unreadable.
No hidden file found
The program could not find the hidden file in the image. Possible causes: there is no hidden file in it (or it has been erased), the password is wrong, the transparent color in the picture is not set correctly, or the hidden data in the picture has been corrupted.
Not enough memory
There is not enough memory to load the bitmap image into memory.
Transparent color must be a RGB triplet for 24-bit pictures
A palette entry was specified for the transparent color of a 24-bit image.
Unable to open xxxxxx
The program could not open the file for reading or writing. Possible causes: the file does not exist (reading), it is read-only (writing), or it is in use by other program.
Unknown error in xxxxxx: xx
If this ever happens, there is a bug in HIP. A routine has returned an error code the main program does not know about. Please report this to me.
200 53 2 195 54 69 191 56
The binary values of these numbers are:
11001000 00110101 00000010 11000011 00110110 01000101 10111111 00111000
To hide the character 109 (in binary 01101101), the least-significant bit of each byte would be replaced by a bit of the character. The result would be:
11001000 00110101 00000011 11000010 00110111 01000101 10111110 00111001
Which corresponds to:
200 53 3 194 55 69 190 57
The difference between the new values and the old ones is very small, so it is difficult, if not impossible, for the human eye to identify any difference from the original picture. If the file is large, it may be necessary to modify more than a single bit from each byte of the picture, which can make this difference more visible.
With 8-bit pictures, the process is a little more complicated, because the bytes in the picture do not represent color intensities, but entries in the palette (a table of at most 256 different colors). HIP chooses the nearest color in the palette whose index contains the appropriate least-significant bits.
The HIP header (containing information for the hidden file, such as its size and filename) and the file to be hidden are encrypted with an encryption algorithm, using the password given, before being written in the picture. Their bits are not written in a linear fashion; HIP uses a pseudo-random number generator to choose the place to write each bit. The values given by the pseudo-random number generator depend on your password, so it is not possible for someone trying to read your secret data to get the hidden file (not even the encrypted version) without knowing the password.
A document describing the HIP file format may be written if anyone wants it. If you need it (to analyze it, write a compliant program or for any other reason), please tell me.
There are already several translations available, and others may become available at any time. The HIP page contains binaries for all the languages.
It uses many libraries by myself (http://www16.brinkster.com/davitf/). The assembly routines were converted into machine code by Pete Eberlein's ASM to Euphoria converter (http://www.harborside.com/home/x/xseal/euphoria/).
The Windows version also uses the Win32Lib library by David Cuny, Derek Parnell and others (http://www.sourceforge.net/projects/win32libex/).