More robust retrieval of colortype from colorspace string
Clean up image writing and remove iterator.jl