Algorithm to rotate an image 90 degrees in place? (No extra memory)

Posted by user9876 on Stack Overflow See other posts from Stack Overflow or by user9876
Published on 2010-06-03T17:38:04Z Indexed on 2010/06/03 17:44 UTC
Read the original article Hit count: 120

Filed under:
|
|
|

In an embedded C app, I have a large image that I'd like to rotate by 90 degrees. Currently I use the well-known simple algorithm to do this. However, this algorithm requires me to make another copy of the image. I'd like to avoid allocating memory for a copy, I'd rather rotate it in-place. Since the image isn't square, this is tricky. Does anyone know of a suitable algorithm?

© Stack Overflow or respective owner

Related posts about c

    Related posts about image-processing