yii\imagine\BaseImage::autorotate PHP Method

autorotate() public static method

Rotates an image automatically based on EXIF information.
Since: 2.1.0
public static autorotate ( string | resource | Imagine\Image\ImageInterface $image, string $color = '000000' ) : Imagine\Image\ImageInterface
$image string | resource | Imagine\Image\ImageInterface either ImageInterface, resource or a string containing file path
$color string
return Imagine\Image\ImageInterface
    public static function autorotate($image, $color = '000000')
    {
        return (new Autorotate($color))->apply(static::ensureImageInterfaceInstance($image));
    }