Added a tilemap class, fixed a bug with the image color conversion