Transposing an image

Hi Everyone,

I am struggling to write a program which reads an image file and transposes the image.
Does anyone have an idea how could this be achieved ?

Studying the Matrix Transpose sample might be a good place to start.

or, use nppiWarpAffine_XXX provided by NPP-library to perform affine-transform.