Jump to content

image orientation


LostKobrakai
 Share

Recommended Posts

Is there a way to apply autorotation to the original file in a imagefield? I know, that it's best to store the original image as is, but I don't want to duplicate the filesize, as it's user generated content. So there's no chance to edit the image afterwards anyway.

Link to comment
Share on other sites

#1: https://processwire.com/talk/topic/3278-core-imagemanipulation/page-2#entry78224

#2:

$tempCopy = $origImage->size( $origImage->width, $origImage->height, array("quality"=>100, "sharpening"=>"none", "autoRotation"=>true) );

if ( @copy($tempCopy->filename, $origImage->filename) ) @unlink($tempCopy->filename);

number two should be done via hook after upload, maybe file-added?

Edited by horst
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...