x = readImage(system.file("images", "sample-color.png", package="EBImage"))
y = transpose(x)
display(x, title='Original')
display(y, title='Transposed')
## performing the transposition of an image twice should result in the original image
z = transpose(y)
identical(x, z)
Run the code above in your browser using DataLab