Skip to content

Image in, corrupted image out

License

Notifications You must be signed in to change notification settings

prayerslayer/glitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glitch

Image in, corrupted image out.

Realistic glitches

Glitches that result from corrupted file data.

JPEG

Corrupted entropy data

Current implementation

  • find FFDA (start of scan) marker in byte stream, two bytes after that are the length, read and skip those
  • until next marker (FFxx, but not FF00)  - skip N bytes, where N random from reasonable range (pay attention to byte stuffing (0xFF00)
    • overwrite 1 byte with
      • slightly different value (e.g. AB->A7)
      • random byte (probably nicer/heaver glitch but gets corrupted more easily)

Better implemenation

Read file twice to figure out start and end of scans, then overwrite N evenly distributed bytes, to avoid the "glitch on top and rest of image has bad colors" effect.

Portrait of Giovanni Arnolfini and his Wife

1 2 3 4 5 6 7 8 9

Corrupted header data

No idea if feasible or desirable.

Artistic glitches

Format-independent artistic interpretations of corrupted data.

  • fractal pixelation spots?
  • whatever Pony Island does?

About

Image in, corrupted image out

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages