public void clear() {
        header = null;
        data = null;
        mainPixels = null;
        mainScratch = null;
        if (previousImage != null) {
            bitmapProvider.release(previousImage);
        }
        previousImage = null;
        rawData = null;
    }
Reads GIF image from stream.

@param is containing GIF file.
@return read status code (0 = no errors).
core/src/main/java/com/bumptech/glide/gifdecoder/GifDecoder.java