An image manipulation program in scala