void (int id, byte[] bitmapFileData) { DirectoryEntry subDirBmp = myRoot.findSubDir(DirectoryEntry.RT_BITMAP).findSubDir(id); RawResource bmpRes = subDirBmp.getRawResource(); // strip off BITMAPFILEHEADER byte[] bitmapResourceData = new byte[bitmapFileData.length - 14]; System.arraycopy(bitmapFileData, 14, bitmapResourceData, 0, bitmapResourceData.length); bmpRes.setBytes(bitmapResourceData); }