0

I've been using a great class to manipulate images for a number of years.

class.upload.php

Currently I need to be able to determine if the image is side wards and rotate it, to vertical position. I understand that I can use

$handle->image_auto_rotate  = true;

But for some reason I'm not having much luck. The image I was testing with is JPEG.

What am I missing?

santa
  • 12,234
  • 49
  • 155
  • 255
  • I'm not having much luck - could you be a little more specific? – lovelace Nov 09 '17 at 20:24
  • the documentation: echo $handle->log; so you get some info on what/why doesn't work as expected (have you tried?) – lovelace Nov 09 '17 at 20:26
  • By "not have luck" I meant I tried but the image is not being rotated. I did look at the log and see that my image's orientation is: Rotate 90 CW, yet, after it is uploaded is is still sideways. – santa Nov 09 '17 at 21:11
  • (class.upload.php src) /** * Rotates the image by increments of 45 degrees * * Value is either 90, 180 or 270 * * Default value is null (no rotation) * * access public * var string; */ var $image_rotate; – lovelace Nov 09 '17 at 21:31
  • have you tried setting $image_rotate, see if that has an impact? – lovelace Nov 09 '17 at 21:31
  • var $image_auto_rotate; is default set to true (i.e. automatically rotates the image according to EXIF data (JPEG only) – lovelace Nov 09 '17 at 21:33
  • I tried this but did not get the desired result. – santa Nov 10 '17 at 20:29

1 Answers1

0

Use: $handle->image_rotate = '90';

lovelace
  • 1,195
  • 1
  • 7
  • 10