Skip to content


Image Resizer#

Image Resizer fits (scales and crops) images to a user-specified width and height that preserves aspect ratio.


The GD extension is required to use this transformer.

Interfaces: Transformer

Data Type Compatibility: Image


# Name Default Type Description
1 width 32 int The width of the resized image.
2 heights 32 int The height of the resized image.


use Rubix\ML\Transformers\ImageResizer;

$transformer = new ImageResizer(28, 28);

Additional Methods#

This transformer does not have any additional methods.