Modified to use python Image library on my mac.
Fixed preprocessor lines to make new mac cpp happy.