initial implementation of the image transformation