 <p>Yes, of course this is possible. You can either use a 3D array:</p> <pre><code>byte[][][] array = new byte[w][h][3]; array[0][0][0] = 123; array[0][0][1] = 234; array[0][0][2] = 125; </code></pre> <p>Or use a 2D array of ints. ints are 4 bytes, which is enough for your requirements:</p> <pre><code>int[][] array = new int[w][h]; array[0][0] = (123 &lt;&lt; 16) | (234 &lt;&lt; 8) | (125); </code></pre>