Image Hacking Handout
Digital files are just data. By cracking them open and taking a look at the raw data, we can manipulate it directly to creatively mess with images, video, etc.
Procedures:
TextWrangler. Any text editor will open files as text, but this one is particularly robust and handles large file sizes. TextEdit, for example, won’t open files larger than 8 MB or so.
- Open TextWrangler. Prefs -> Disable Quicktime translation and playback.
- Find a file to hack and open it. Look for all files, not just readable formats. You usually want to duplicate the file first so you don’t accidentally destroy the original.
NOTE: Don’t rewrap or hard wrap text (won’t open as original format). - Look at the header for file format clues. For instance, the format and creator name codes (”JFIF”, “ADB”)
NOTE: You can look up these codes for clues on Wikipedia. Information about the organization of data in the file will help determine what you can hack and what you have to leave alone. - Modify data below the header (otherwise you might make it unreadable). Go nuts!
Check out the original of this example jpeg file.
Try deleting data (e.g. 70s MerckxColnago-hack.jpg)
Try find and replacing a small string, Search -> Find… (e.g. 70s MerckxColnago-hack2.jpg)
Try recording a script of your actions, Script menu -> Record, and running it on other images!
Scripts kept in ~/Library/Application Support/TextWrangler/Scripts
NOTE: Video files are more complicated. Quicktime will not display messed up video in many cases… but VLC usually will! The player makes a big difference. Even images will appear differently depending on what app you use to view them (cute japanese bunny!-hack.jpg — appears viewable in Finder, worse in Preview, super bad in Photoshop, and crashes GraphicConverter! BTW, here’s the original.) So you can use this technique to reverse-engineer software as well as image formats.
Further Ideas:
Any file can be hacked. In fact, some procedural files can easily be hacked. Photoshop’s Liquify filter saves .msh files. Hack ‘em!
With some more complex scripting, you could pull fresh content into your search and replace script, e.g. insert google results from keywords… it’s wide open!
– If you attended this info session, please fill out the evaluation. Thanks!
Tags: digital media lab, faculty, heimbold, learn, student, workshop

