Warning: this document is still work in progress. Feel free to send comments but do not consider it final material.
This is the full Python source code to all examples presented in this document. It can also be downloaded as a standalone study.py Python program.
Just install the python-gd package on your favourite operating system and run the script. With the exception of the original colour 512×512 Lena image, all Lena images and gradients were generated from this program. If you have installed Inkscape, many graphics such as dither matrices will also be automatically generated.
Many algorithms implemented here will seem rather inefficient to people used to writing image processing software. This is because clarity was almost always preferred over performance. We believe this document to be of important value to many researchers in the field, because it implements methods for which there is no public implementation.
$l) { if(ereg('temporary cruft', $l)) break; $l = htmlspecialchars($l); $c = 0; $l = preg_replace('/#[^0-9a-f].*/', '\\0', $l, -1, $c); if($c <= 0) { $l = preg_replace('/(".*"|\\\\$)/', '\\0', $l); $l = ereg_replace('[A-Z][A-Z][A-Z0-9_]*', '\\0', $l); $l = preg_replace('/\b(for|def|in|return|while|if|elif|else|class |True|False|None|break|continue|and|or|not|print|global|import|try|catch|yield)\b/', '\\0', $l); $l = preg_replace('/\b([0-9]+[.][0-9]*|[0-9]*[.][0-9]+|[0-9]+)\b/', '\\0', $l); } echo $l; } ?>