added image transformation functions