@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private static synchronized BitmapFactory.Options getDefaultOptions() {
        BitmapFactory.Options decodeBitmapOptions;
        synchronized (OPTIONS_QUEUE) {
            decodeBitmapOptions = OPTIONS_QUEUE.poll();
        }
        if (decodeBitmapOptions == null) {
            decodeBitmapOptions = new BitmapFactory.Options();
            resetOptions(decodeBitmapOptions);
        }

        return decodeBitmapOptions;
    }
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