<?php

namespace Sargilla\Flatlab4\ImagesFilters;

use Intervention\Image\Image;
use Intervention\Image\Filters\FilterInterface;

class SubirImagen implements FilterInterface
{
    public function applyFilter(Image $image)
    {
        // return $image->fit(250, 250);
        return $image->resize(250, null, function ($constraint) {
            $constraint->aspectRatio();
        })->resizeCanvas(250, 250, 'center', false);
    }
}
