protected int[] getImageData(Bitmap img) {
        int w = img.getWidth();
        int h = img.getHeight();

        int[] data = new int[w * h];
        img.getPixels(data, 0, w, 0, 0, w, h);
        return data;
    }
Extracts image pixels into byte array "pixels"
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGifEncoder.java