@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private static void resetOptions(BitmapFactory.Options decodeBitmapOptions) {
        decodeBitmapOptions.inTempStorage = null;
        decodeBitmapOptions.inDither = false;
        decodeBitmapOptions.inScaled = false;
        decodeBitmapOptions.inSampleSize = 1;
        decodeBitmapOptions.inPreferredConfig = null;
        decodeBitmapOptions.inJustDecodeBounds = false;
        decodeBitmapOptions.outWidth = 0;
        decodeBitmapOptions.outHeight = 0;
        decodeBitmapOptions.outMimeType = null;

        if (Build.VERSION_CODES.HONEYCOMB <= Build.VERSION.SDK_INT)  {
            decodeBitmapOptions.inBitmap = null;
            decodeBitmapOptions.inMutable = true;
        }
    }
A method for getting the dimensions of an image from the given InputStream.

@param is The InputStream representing the image.
@param options The options to pass to
         {@link BitmapFactory#decodeStream(InputStream, android.graphics.Rect,
             BitmapFactory.Options)}.
@return an array containing the dimensions of the image in the form {width, height}.
core/src/main/java/com/bumptech/glide/load/resource/bitmap/Downsampler.java