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
Not sure what processing you will do after the rotation, but you can leave it alone and use another function to read rotated pixel from the original memory.
uint16_t getPixel90(Image *img, int x, int y)
{
return img->data[(img->height - x) * img->width + y];
}
Where input parameter x and y has swapped dimension from original