Convert image pixels to quadruples Example given an image which width and height is a power of two .

First step : Divide each image into Cartesian coordinate quadrants 


 _____ _____
|     |     |
|  2  |  1  |
|_____|_____|
|     |     |
|  4  |  3  |
|_____|_____|


Second step :  Divide each quadrant to another four quadrants and add new quadrant id after the old one , like this : 


 _____ _____ _____ _____
|     |     |     |     |
|  22 |  21 |  12 |  11 |
|_____|_____|_____|_____|
|     |     |     |     |
|  23 |  24 |  13 |  14 |
|_____|_____|_____|_____|
|     |     |     |     |
|  32 |  31 |  42 |  41 |
|_____|_____|_____|_____|
|     |     |     |     |
|  33 |  34 |  43 |  44 |
|_____|_____|_____|_____|


And so on...


 _____ _____ _____ _____ _____ _____ _____ _____
|     |     |     |     |     |     |     |     |
| 222 | 221 | 212 | 211 | 122 | 121 | 112 | 111 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 223 | 224 | 213 | 214 | 123 | 124 | 113 | 114 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 232 | 231 | 242 | 241 | 132 | 131 | 142 | 141 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 233 | 234 | 243 | 244 | 133 | 134 | 143 | 144 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 322 | 321 | 312 | 311 | 422 | 421 | 412 | 411 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 323 | 324 | 313 | 314 | 423 | 424 | 413 | 414 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 332 | 331 | 342 | 341 | 432 | 431 | 442 | 441 |
|_____|_____|_____|_____|_____|_____|_____|_____|
|     |     |     |     |     |     |     |     |
| 333 | 334 | 343 | 344 | 433 | 434 | 443 | 444 |
|_____|_____|_____|_____|_____|_____|_____|_____|


Until number of quadrants is equal to the number of pixels

Should return a 2d array of quadruple coordinates .

Inspired from : https://imgur.com/a/QWMGi
Mathematica, 95 86 bytes

Since the method of input has not been specified, I'm simply expecting the resolution to be saved as an integer in the variable n

r={{""}};Do[r=ArrayFlatten[r/.q_String:&gt;{{q&lt;&gt;"2",q&lt;&gt;"1"},{q&lt;&gt;"3",q&lt;&gt;"4"}}],{Log2@n}];r


With indentation:

r = {{""}};
Do[
  r = ArrayFlatten[
    r /. q_String :&gt; {{q &lt;&gt; "2", q &lt;&gt; "1"}, {q &lt;&gt; "3", q &lt;&gt; "4"}}
  ],
  {Log2@n}
];
r