Good afternoon, I have a color image in a 1D array, for example:
int[] image = {255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 255, 0, 255, 0, 0};
This array has 6 pixels, red, green, blue, blue, green, red, imagining that these pixels are positioned horizontally:
| Vermelho | Verde | Azul |
| Azul | Verde | Vermelho |
In what way I could rotate this image so that the pixel layout becomes vertical:
| Azul | Vermelho |
| Verde | Verde |
| Vermelho | Azul |
I want to put this rotated array in another 1D array.