Convert image pixels to quadruples
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