Mike Elgun [sic] goes postal at TWiT


Mike Elgan is sick of the trolls. He has a plan; a "Final Solution" for keyboard bashing malcontents. "Hold onto your hats, I'm here to expunge the sociopaths!". Abandon Twitter and join the G+ party. Google+ is free from the scum of society, the rogue agents, the riff raff of ordinary internet existence. It's also free from any form of life at all, but don't let that put you off! "Join G+ or taste lead". Testify!

context: http://youtu.be/2Z0s9-PNg1s?t=44m21s
image: http://cinema.theiapolis.com/movie-2SPJ/the-skin-i-live-in/gallery/antonio-banderas-as-robert-ledgard-in-the-1065414.html

JPEG destruction, via repeated rotate and saves - Python 3.0+ implementation



A previous blog post detailed experimentation with Windows XP's image viewer, to degrade jpeg images. Windows Vista/7/8 fixed this issue with the native viewer, so it no longer saves after each rotation. To implement the process in operating systems outside of Windows XP, a custom algorithm had to be formed. I tried implementing this with Processing, but it was cumbersome to achieve. In Python, using the PIL module, the procedure is trivial.

UPDATE: 2019.08.03

Having recently reviewed the original Python script included in this post, it was clear it could do with serious improvements. An updated, simpler and more logical version (with comments), has been included below. The original script can be found underneath it.

from PIL import Image

# Image file to rotate
filename = "image.jpg"

# Amount of times image is rotated
for i in range(0, 1000):
   # Open image file
   img = Image.open (filename)
   # Rotate file 90 degrees and save it
   img.rotate(90,expand=True).save(filename, "JPEG")
   # If image has rotated 4 times (360 degrees) save new image
   if (i % 4) == 0:
      img.save (str(i/4)+".jpg", "JPEG")

Old version:
from PIL import Image

# Keeps track of orientation
flipBack = 90

# Bootstrapping first image
img = Image.open("original.jpg")
img.rotate(270).save("0.jpg", "JPEG")

# Loads file, rotates, saves as new file
for i in range(0, 19):
    img = Image.open(str(i)+".jpg")
    img.rotate(270).save(str(i+1)+".jpg", "JPEG")

    # Rotates back to original orientation, saves over file
    img.rotate(flipBack).save(str(i)+".jpg", "JPEG")
    if flipBack <= 180:
        flipBack += 90
    else:
        flipBack = 0



related: http://oioiiooixiii.blogspot.ie/2014/08/the-effects-of-rotating-images-in.html

The effects of rotating images in Window XP


A few years ago, I experimented with Windows XP's "Image and Fax Viewer", to see what repeated rotations, numbering hundreds and thousands, would do to a jpeg image. Each rotation would cause the image to be automatically saved, which caused substantial degradation to the image. The procedure was automated by writing a vbscript which interacted with the image viewer. These are some images from the original tests.


Emilee Cox is a girl that once sent over 30,000 text messages from her phone in a month. I thought it only right to rotate her image the same amount of times, but as you can see from the results, she didn't even last for a thousand.

source: http://emileecox.blogspot.com/



Bill Gates proved a tough nut to crack. Still discernible after thirty thousand rotations.


With entropy increasing, so did file size, as more and more chaotic detail had to be compressed.

Contents of this blog post were originally published: March 05, 2009