Skip to content

[source]

Image Resizer#

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

Note

The GD extension is required to use this transformer.

Interfaces: Transformer

Data Type Compatibility: Image

Parameters#

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

Example#

use Rubix\ML\Transformers\ImageResizer;

$transformer = new ImageResizer(28, 28);

Additional Methods#

This transformer does not have any additional methods.