<?php
namespace Modules\Project\Filters;

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

class WylpSmall implements FilterInterface
{
    public function applyFilter(Image $image)
    {
        /*
         * 调整图像的高到340，并约束宽高比(宽自动)
         */
        return $image->resize(340, null, function ($constraint) {
            $constraint->aspectRatio();
        });
    }
}
