factored out annoying image handling stuff into class ImageWrapper