Image
class Image (View source)
Provides helpers to operate on images.
Methods
static bool
scaleDimensions(array $dimensions, int $width = NULL, int $height = NULL, bool $upscale = FALSE)
Scales image dimensions while maintaining aspect ratio.
Details
static bool
scaleDimensions(array $dimensions, int $width = NULL, int $height = NULL, bool $upscale = FALSE)
Scales image dimensions while maintaining aspect ratio.
The resulting dimensions can be smaller for one or both target dimensions.