Tuesday, July 12, 2005

databending images in wordpad

pursuant to my my post from saturday, dj empirical has tried his hand at databending images, using wordpad as his editing environment. this was his first successful bend:


what i did was:
  • open the jpg in photoshop
  • save the image as a tif
  • changed the extension to "txt" and opened it in wordpad
  • changed a random character (i think a "K" to a "J")
  • saved and closed wordpad
  • changed the extension back to tif and opened the image in ms paint
  • saved the image as a bmp

pretty cool, and not bad for a first bend. but something else was going on here... replacing one single character is simply not enough to bend a BMP file that severely. changing that K to a J would do little more than cause a one-pixel shift in the image, or maybe an RGB color shift (as discussed here).

syntax noticed it too and pointed out what had actually bent the image: merely opening the file in wordpad and resaving it adds a bunch of junk to the data.

to test the hypothesis, dje tried again, this time not making any changes of his own to the data, just opening a BMP in wordpad and resaving. this was the result:



as another test, i opened the original jpg in wordpad and resaved. that process rendered the file unreadable.

also note: the same phenomenon explains why this bend by rizzia looks the way it does, as the submissions and extras section of my bent image gallery tells us that the process was essentially the same: open in wordpad, change one character, and resave.

we might as well start calling that warped look "the wordpad effect".

3 comments:

Tom Oakley said...

I am having problems trying to do this - how do I change the file extension of a tif to a txt?
I've tried just writing .txt on the end of the file but it doesnt then become a txt file, it's a tif with .txt on the end.
Does that make sense?

stAllio! said...

don't change the file extension!

in the "open" dialog box in wordpad, go to the bottom and set "files of type" to "all files". then just open the tif file directly in wordpad, and resave.

Anonymous said...

Similar question - I've got as far as opening it in wordpad and saving it, what I can't work out how to do is to change it back into a tif file from a txt. Because paint just thinks it's a text file now. Any help much appreciated!