Image rotate during save() imagine php

138 views Asked by At

I use the imagine library to manage the sizing of images.

$imagine = new Imagine\Imagick\Imagine();
$imagine->open($file)
        ->thumbnail(new Imagine\Image\Box(1000, 2000), Imagine\Image\ImageInterface::THUMBNAIL_INSET)
         ->save($file);

I use the following function to generate a thumbnail with proper dimensions. However, on some images (only), the images turn over 90 degrees (here an image of 3024x4032). Do you know how to keep the orientation ? (I did not find an option in the documentation). Thanks in advance

0

There are 0 answers