private float getScale(Bitmap bitmap) {
            View container = containerReference.get();
            if (container == null) {
                return 1f;
            }

            float maxWidth = container.getWidth();
            float originalDrawableWidth = bitmap.getWidth();

            return maxWidth / originalDrawableWidth;
        }
Get the compressed image with specific quality from URL
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/html/HtmlHttpImageGetter.java