This topic is locked

Wrong image rotate

7/11/2017 2:52:01 AM
PHPRunner General questions
R
Rigmantas author

Hi,

In my projects upload image (i want make a gallery) is wrong image rotate. I search in forums, find in uploadhandler.php next:



// Set to true to rotate images based on EXIF meta data, if available:

$this->options['image_versions'] = array();

if ($options)

{

foreach($options as $key=>$value)

{

if(array_key_exists($key, $this->options))

{

$this->options[$key] = $options[$key];

}

}

}



Can you help me do the image rotate right.

Thank you.

Regards,

Rimantas

lefty 7/12/2017



Hi,

In my projects upload image (i want make a gallery) is wrong image rotate. I search in forums, find in uploadhandler.php next:



// Set to true to rotate images based on EXIF meta data, if available:

$this->options['image_versions'] = array();

if ($options)

{

foreach($options as $key=>$value)

{

if(array_key_exists($key, $this->options))

{

$this->options[$key] = $options[$key];

}

}

}



Can you help me do the image rotate right.

Thank you.

Regards,

Rimantas


I think there is a line missing

'auto_orient' => true

But it must have been taken out for a reason . I don't see anywhere in the function or uploadhandler.php where it is used/defined.
It would ordinarily go along with this function in Jquery plugin
See this link Look for
I believe I have tried this in the past with no success in before add with upload. The issue I had is due to Exif data in IOS / Ipad photos , came out either sideways or upside down when opening in windows or certain image editors. I got around this by having the users take photos with the ipad in landscape only and lens behind would be in upper left corner / your left finger.