transforming image directly