How do I load an ARGB_8888 Image with a normal DataInputStream?
<p><strong>Edited:</strong> Thanks for the previous answers and help! I've decided to edit this question into what I need exactly, sorry for not being as specific earlier.</p>

<p>Basically the title is all the information, this is currently what I'm working with:</p>

<pre><code>int channels = 4;
int length = width * height;
int[] data = new int[length * channels];
int[][] channelPixels = new int[4][length];

for (int c = 0; c &lt; channels; c++) {
    for (int i = 0; i &lt; length; i++) {
        channelPixels[c][i] = readByte();
    }
}
</code></pre>

<p>Unfortunately, the colors don't seem to match up to the originals.</p>

<p>Is there something I'm doing wrong here?</p>
