LostKobrakai Posted November 26, 2014 Share Posted November 26, 2014 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 More sharing options...
horst Posted November 26, 2014 Share Posted November 26, 2014 (edited) #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 November 26, 2014 by horst 2 Link to comment Share on other sites More sharing options...
LostKobrakai Posted November 26, 2014 Author Share Posted November 26, 2014 #1 doesn't work for api added images, so the second one is the number of choise. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now