Turn an image by 90 degree Given an image, how will you turn it by 90 degrees? A vague question. Minimize the browser and try your solution before going further. An image can be treated as 2D matrix which can be stored in a buffer. We are provided with matrix dimensions and it’s base address. How can we turn it? For example see the below picture, * * * ^ * * * * * * | * * * * * * | * * * * * * | * * * * * * * * * * * * * * * -- - - > * * * * * * * * * * * * The idea is simple. Transform each row of source matrix into required column of final image.
Read full article from Turn an image by 90 degree | GeeksforGeeks
No comments:
Post a Comment