In light of the recent earthquake in Sichuan, our website team turned most of exoweb.net gray.
I just want to spend a bit of time to document how we did it.
First we change all the images into grayscale using PIL with the following code snippet:
import Image
import glob
import os
for file in glob.glob('*'):
if os.path.isfile(file):
print file
img = Image.open(file)
gray = img.convert('L')
gray.save('gray-' + file)
We don't have a very complicated directory heirarchy, so the above code was sufficient.
We cloned the main CSS file and created a copy for the gray version. We remove the styles that used colours and replaced them with gray versions.
After that we updated our Apache rewrite rules and redirected the normal CSS and images to the gray ones.
As a parting note, I send my condolences to those who lost their loved ones.

Recent Comments