Dgr_dr is a project built during Y-Hack 2013. After throwing around a lot of ideas for an interesting hack over a period of a few weeks, we settled on a degrading image hosting service (at that point referred to as "SaltyHash"). At the hackathon, the task of developing Dgr_dr broke into three parts: web design (Max), image corruption (Will), and Flask backend (Jeff).

Dgr_dr is built on top of Flask and Python Image Library (PIL) and is hosted on Red Hat Openshift. None of us knew Flask prior to Y-Hack — Jeff, on a whim, decided to play around with it the night before the hackathon after we had decided to use PIL to manipulate uploaded images and decided to use a Python backend to serve the images. The backend handles displaying of the index, upload, and image view pages. The thumbnails on the index page are 20 randomly chosen images among all those ever uploaded. The (frankly ridiculous) title is a jab at the naming schemes of webapps and services like imgur, flickr, and gravee.

The website itself was actually relatively fast to develop, thanks to the amazingly simple python libraries we built everything on. Unfortunately, due to our relative inexperience with OpenShift, we spent around nine hours struggling with getting flask and pil to work with the Python 2.7 cartridge without any kind of error logging beyond "500 internal server error".

The corruption algorithm uses PIL (actually Pillow due to incompatabilities with pip) to "corrupt" images. Each time an image is viewed, the script picks a random row or column, a random length of pixels within that column, and chooses to either or/xor the selected pixels with their neighboring pixels. The result is a corruption effect that uses the image itself, such that the corrupted pixels still vaguely resemble the original image. Eventually though, we managed to finish Dgr_dr (and a few other projects) in time to submit for the end of the hackathon.

In the future we hope to expand the image degradation algorithm to incorporate other methods of introducting corruption to images, as well as allow finer-grained control over the rate and method of degradation of an image at the time of upload (thus allowing the uploader to choose how quickly an image degrades). We also intend to expand the web backend to allow paginated viewing of images, as well as image viewing statistics.

Dg_dr is published under a GPLv3 Liscence You can find the git repo here, and an instance of the application hosted here