docs: public static Bitmap loadThumbnail(@NonNull final File file, final int maxWidth,
                                         final int maxHeight) throws IOException {
          Pair<Integer, Integer> imageDimensions = getImageDimensions(file);
          int sampleSize = getSampleSize(imageDimensions, maxWidth, maxHeight);
          BitmapFactory.Options options = new BitmapFactory.Options();
          options.inJustDecodeBounds = false;
          options.inSampleSize = sampleSize;
          String path = file.getAbsolutePath();
          Bitmap thumbnail = BitmapFactory.decodeFile(path, options);
  
          if (thumbnail == null) {
              throw new IOException("Failed to decode image \"" + path + "\"");
          }
  
          return thumbnail;
      }