HOME | DD

quadrixel — Bending a Bridge

#glitch #glitchart #vim #databending
Published: 2016-08-22 11:54:37 +0000 UTC; Views: 519; Favourites: 5; Downloads: 2
Redirect to original
Description Databending a bitmap, using vim.
Related content
Comments: 4

AbdouBouam [2016-08-22 19:21:54 +0000 UTC]

Interesting.
Did you get that by just modifying one or few bytes? Becaise one time I compared a corrupt Jpeg image with similar glitch and the original, there was only 1 byte different somewhere in the beginning of the image

👍: 0 ⏩: 1

quadrixel In reply to AbdouBouam [2016-08-22 19:53:24 +0000 UTC]

I converted it to bmp, first. Then I deleted and dublicated some lines. That shifted parts of the picture horizontally.
Next, I tried replacing a few characters. There was little to no change.
What really did the job was adding a carriage return to each linefeed in the file. It shifted the picture even more, but also messed with the colors.

However, I did another experiment with vi before. I can tell you, If you catch the right line and delete it, it will shift all colors. 

👍: 0 ⏩: 1

AbdouBouam In reply to quadrixel [2016-08-22 21:38:53 +0000 UTC]

Oh I see.
BMP stores each pixel's info as triplets of 8-bits (for R,G and B). In theory if you delete only one byte from the first pixel (after you locate where the metadata ends and the actual image starts) then you will shift all the colors of the image because instead of having info like R1G1B1,R2G2B2,R3G3B3... (R1 is the value of red in the pixel #1 originally, G1 is green ...etc) You will have G1B1R2,G2B2R3,G3B3R4...
Also (still in theory), if you want to shift an image by X pixels, all you have to do is delete 3*X characters from the file and to end the shift you can put the same ammount later on

👍: 0 ⏩: 1

quadrixel In reply to AbdouBouam [2016-08-23 06:36:05 +0000 UTC]

True. Makes sense.

👍: 0 ⏩: 0