-
public class ThumbnailSizeCheckerUtility class to consistently check whether a given thumbnail size will be sufficient for a given request with com.facebook.imagepipeline.common.ResizeOptions.
-
-
Field Summary
Fields Modifier and Type Field Description private final FloatACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIOpublic final static ThumbnailSizeCheckerINSTANCE
-
Method Summary
Modifier and Type Method Description final static BooleanisImageBigEnough(Integer width, Integer height, ResizeOptions resizeOptions)Checks whether the producer may be able to produce images of the specified size. final static BooleanisImageBigEnough(EncodedImage encodedImage, ResizeOptions resizeOptions)final static IntegergetAcceptableSize(Integer size)final FloatgetACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIO()The ratio between the requested size and the minimum thumbnail size which will be considered big enough. -
-
Method Detail
-
isImageBigEnough
final static Boolean isImageBigEnough(Integer width, Integer 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 widthheight- the desired height
-
isImageBigEnough
final static Boolean isImageBigEnough(EncodedImage encodedImage, ResizeOptions resizeOptions)
-
getAcceptableSize
final static Integer getAcceptableSize(Integer size)
-
getACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIO
final Float getACCEPTABLE_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.
-
-
-
-