Initial commit

Still unoptimized (using RandomAccess for input image)