April 25, 2013

Creating a binary overlay image with the gimp

I saw a cool image at the Last Ninja Archives a couple of weeks ago. I got so inspired that I had to try to do something similar. First I needed a binary text file, there is an online ASCII to binary converter. So you don't have to write one on your own.

Looking at the Last Ninja Archive kinda brought me back in time. So I decided to get a Commodore 64 font. To install the font on OSX use the font book tool. In LinuxMint (or Ubuntu) run the command:

# gksudo "nautilus"
 
Then, click the install font button in the top right corner of nautilus. This should add the font to all the needed places. Here is some additional help for installing fonts in linux and some for adding fonts to the gimp windows version. (I found that I also needed to reboot the window$ machine to see the font (what a surprice!! :D))

The look I'm interested in is an overlay of transparent binary numbers allowing you to see The last Ninja through the digits. Also, the image should look like it is running on an old monitor, filled with scan lines.

To create the image you'll need to know how to use layers, the color select and fill tool. Before you start take some time to tune in on slayradio and then fire up the Gimp and paint away.

First, create the video overlay

  1. Open the source image.
  2. Press 'command' d to duplicate the image.
  3. Select: filters | distorts | video.
  4. Keep the default settings in the video dialog, perfect old scanline look.
  5. Press ok and see the result.
  6. Save the image so you dont loose it.

Second, create the binary text

  1. Goto ASCII2BinaryConverter.
  2. Paste a portion of ASCII encoded text and press convert.
  3. Copy the converted binary text.
Remember you'll need plenty of 1 and 0's as you have to cover the image widt and height. The numbers of characters in row is: image width/font size. So, row characters = 558px/10px ≈ 55 characters.

The number of character rows are: image height/font size. Which adds up to 312px/10px = 31 rows.
which is characters * rows = 55 * 31 = 1705 characters.

That means you'll need to convert at least num charecters/binary encoding, which is 8bits. Thats: 1705/8 ≈ 214 characters all in all. Then you'll need a few more just to align the binary text nicely with in the image.

Third, creating the binary text

  1. Create a new image in the same size as the source image with white background color.
  2. Select the text tool and cover the whole image area.
  3. Choose: Commodore font size 10, un-tick anti aliasing, and paste all your binary text.
  4. Color select the binary text, using the color selector tool, un-tick no feather.
  5. Copy the selection from your binary text image.
  6. Paste as new layer on the white image.

Fourth, create the binary mask

  1. Select color the pasted text using color select. (if it is not selected after paste).
  2. Merge layer down.
  3. Invert selection.
  4. Select: menu item edit and fill with foreground color.
  5. Invert selection.
  6. Cut the letters to get a black drawing with transparent characters.
  7. Select none.
  8. Save the binary mask image.

Fifth, we'll add the binary mask to the scan line image

  1. Open the scan line image.
  2. Open the binary mask image.
  3. Color select the black part of the binary mask.
  4. Cut the mask.
  5. Paste as new layer on the scan line image.
  6. Save your image.

If you like, you can now invert the selection and cut only the zeros and ones containing the parts of the original image. This can be pastes into a new image with transparent background, to create an image that will work on other than black background. Remember black ninja's are the coolest.



Here's an image based on the original C= graphics, screenshot from vice.

No comments: