[ [1,2], [3,4] ] can be interpreted as

```
1 2
3 4
```

or

```
3 4
1 2
```

or ...

Suppose matrix is indexed with matrix[x][y],

If x+ to y+ is CCW, the pixel transform is (x,y) -> (y,n-1-x) for a 90 degree CW rotation of image (which is the assumption in judgment);

otherwise the pixel transform is (x,y) -> (n-1-y, x) for the same image rotation.

So I think the problem should specify the directions of axes since in image area x->y is usually CW.