use python imaging library instead of opencv

seems to always give data in rgb, so change our conversion function

uses the slow getpixel and putpixel functions, because the faster
direct indexing didn't seem to work. still much faster than opencv