Hmm….here is a new one…what is under consideration now is the extraction of ID3 tags. Media players usually display a description of the files played by it. These descriptions are encoded in the file being played. ID3 tags are components of an mp3 file where the name of the song, the artist, the album etc are written. ID3 tags starts from the 128th character position from the end of the file.

This is how an ID3 an tag is formed:-

Field Length Description
header 3 “TAG”
title 30 30 characters of the title
artist 30 30 characters of the artist name
album 30 30 characters of the album name
year 4 A four-digit year
comment 28 or 30 The comment.
zero-byte 1 If a track number is stored, this byte contains a binary 0.
track 1 The number of the track on the album, or 0. Invalid, if previous byte is not a binary 0.
genre 1 Index in a list of genres, or 255

Courtesy : Wikipedia

This information can be made useful to extract ID3 tags from an mp3 file. Here is a simple python code demonstrating how the file descriptions can be extracted from a given mp3 file.

Download Complete Source Here :-

id3.py


Does anything seems special to this image..?? nah?? its just a simple jpeg image…a very usual one…now here is what can make it special…This simple jpeg image can be use to hide out a secret message. There 2 simple programs demonstrated here. The first one encodes the image, hides your message and creates a file encrypted_image.bmp . The program uses a very simple technique. The first row of pixels along the X-axis encodes a password supplied by you before the encryption is done. After this is done you can enter the message to be encoded. The program gathers the ascii value of each character in the message supplied by you. Now it replaces the R-values(Red) of the pixels at pre-defined points by inserting the ascii of each character in you message.

Similarly, the decrypt.py file decodes the encrpyted_image.bmp generated by the first code and re-produces the message inserted into the picture. For the decryption process to begin, the password supplied at the encoding code, and the message length(shown when the encoding is complete) must be used.

The programs use very easy way to select the “selective pixels”. Encoding can be made harder using some algorithm.Ah! forgot to tell…there wont be any visible difference in the encrypted_image.bmp generated!! . This is because only a very few pixels form selected points are being replaced…!!

Download complete source here:-

Encryption code

Decryption Code

Here is a minimal image image to text converter using python imaging library, PIL. The program receives its input a binary BITMAP(.bmp) image, (i.e it  has only pixel values (0,0,0) and (255,255,255) . Jpeg files do not produce a perfect output, may be because of the encoding used. The converter program scans the whole image and creates a set of values which are written to a text file “text”. The equivalent text can be seen in the output file.

An example of a text generated from a bitmap image is shown below:-

The Binary image of a square

00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000111111111100000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000

The source code of the program is :-