moved everything image related to its own class, to be used in the image tests too