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 requi
the real answer: no, u can't without allocating some memory.
or you have to use recursion, which will fail with large images.
however there are methods that require less memory than the image itself
for example, you could take point A (x from 0 to width, y from 0 to height), calculate it's new location, B, copy B to it's new location (C) before replacing it with A, etc..
but, that method would require to keep track of what bytes have already been moved. (using a bitmap of one bit per pixel in the rotated image)
see the wikipedia article, it clearly demonstrates that this cannot be done for non square images: here is the link again: http://en.wikipedia.org/wiki/In-place_matrix_transposition