Skip to content

Instantly share code, notes, and snippets.

@firstspring1845
Created September 16, 2014 19:39
Show Gist options
  • Save firstspring1845/d96781648898a57cd9f6 to your computer and use it in GitHub Desktop.
Save firstspring1845/d96781648898a57cd9f6 to your computer and use it in GitHub Desktop.
import random
f = open('a.bmp','rb').read()
f = list(f)
for i in range(0x36, len(f)):
if random.random() < 0.5:
f[i] = 255
else:
f[i] = 192
open('b.bmp','wb').write(bytes(f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment