| 909 | } |
| 910 | template<class CArray, class Array> |
| 911 | void rot270(CArray t1, int w1, int h1, Array t2, int& w2, int& h2) { |
| 912 | w2 = h1; h2 = w1; |
| 913 | for (int h = 0; h < h1; ++h) |
| 914 | for (int w = 0; w < w1; ++w) |
| 915 | t2[pos(h2-w-1, h, h2, w2)] = t1[pos(h, w, h1, w1)]; |
| 916 | } |
| 917 | template<class CArray, class Array> |
| 918 | void flipx(CArray t1, int w1, int h1, Array t2, int& w2, int& h2) { |
| 919 | w2 = w1; h2 = h1; |