-
public class ImagePreprocessChain extends PreprocessChain<Bitmap>
A preprocess chain to run on images before uploading. Pass an instance of a populated chain to preprocess. The processing steps will run by the order in which they were added to the chain. This chain uses the default Bitmap encoder/decoder, however custom implementations can be supplied using loadWith and saveWith.
-
-
Method Summary
Modifier and Type Method Description static ImagePreprocessChainlimitDimensionsChain(int maxWidth, int maxHeight)Convenience method for building an efficient dimension limiting chain using BitmapDecoder and Limit. -
-
Method Detail
-
limitDimensionsChain
static ImagePreprocessChain limitDimensionsChain(int maxWidth, int maxHeight)
Convenience method for building an efficient dimension limiting chain using BitmapDecoder and Limit.Use this in preprocess.The scaling retains the original aspect ratio while guaranteeing the height and width are within the requestedmaximum bounds. Note: If the image is already smaller it will be returned unchanged.
- Parameters:
maxWidth- The maximum width allowed.maxHeight- The maximum height allowed.
-
-
-
-