public final class

ThumbnailSizeChecker

extends Object
java.lang.Object
   ↳ com.facebook.imagepipeline.producers.ThumbnailSizeChecker

Class Overview

Utility class to consistently check whether a given thumbnail size will be sufficient for a given request with ResizeOptions.

Summary

Constants
float ACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIO The ratio between the requested size and the minimum thumbnail size which will be considered big enough.
Public Constructors
ThumbnailSizeChecker()
Public Methods
static int getAcceptableSize(int size)
static boolean isImageBigEnough(EncodedImage encodedImage, ResizeOptions resizeOptions)
static boolean isImageBigEnough(int width, int height, ResizeOptions resizeOptions)
Checks whether the producer may be able to produce images of the specified size.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final float ACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIO

The ratio between the requested size and the minimum thumbnail size which will be considered big enough. This will allow a thumbnail which is actually 75% of the requested size to be used and scaled up.

Constant Value: 1.3333334

Public Constructors

public ThumbnailSizeChecker ()

Public Methods

public static int getAcceptableSize (int size)

public static boolean isImageBigEnough (EncodedImage encodedImage, ResizeOptions resizeOptions)

public static boolean isImageBigEnough (int width, int height, ResizeOptions resizeOptions)

Checks whether the producer may be able to produce images of the specified size. This makes no promise about being able to produce images for a particular source, only generally being able to produce output of the desired resolution.

Parameters
width the desired width
height the desired height
Returns
  • true if the producer can meet these needs