private void copyDecodedStreamBytesIntoRGB(int[] pixels) {
        byte[] rgb = new byte[3];
        try {
            InputStream input = getInputStreamForDecodedStreamBytes();
            for (int pixelIndex = 0; pixelIndex < pixels.length; pixelIndex++) {
                int argb = 0xFF000000;
                if (input != null) {
                    final int toRead = 3;
                    int haveRead = 0;
                    while (haveRead < toRead) {
                        int currRead = input.read(rgb, haveRead, toRead - haveRead);
                        if (currRead < 0)
                            break;
                        haveRead += currRead;
                    }
                    if (haveRead >= 1)
                        argb |= ((((int) rgb[0]) << 16) & 0x00FF0000);
                    if (haveRead >= 2)
                        argb |= ((((int) rgb[1]) << 8) & 0x0000FF00);
                    if (haveRead >= 3)
                        argb |= (((int) rgb[2]) & 0x000000FF);
                }
                pixels[pixelIndex] = argb;
            }
            if (input != null)
                input.close();
        } catch (IOException e) {
            logger.log(Level.FINE, "Problem copying decoding stream bytes: ", e);
        }
    }