FileResizerHelper

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun resizeFile(fileToResize: File, dimension: FileResizerHelper.Dimension): File

Resize an image file to a given dimension. The possible dimensions are small (256px), medium (512px) and large (1024px). The method will scale the largest between height and width to the given dimension without change the relation between them. In case both height and width are smaller than the given dimension the method will return the given file without modifications.