Barand Posted December 6, 2019 Share Posted December 6, 2019 If the exif data is the same you must be getting it from the same file. Try getting the exif data from the rotated file. Quote Link to comment Share on other sites More sharing options...
phppup Posted December 6, 2019 Author Share Posted December 6, 2019 Yes, I understand that. But shouldn't calling the EXIF again after the script is ended bring up the new information? I even tried to re-run the function as function newInfo, but it pulled the same data. Quote Link to comment Share on other sites More sharing options...
Barand Posted December 6, 2019 Share Posted December 6, 2019 You start with FileA. You rotate it and store it in FileB. If you now output the exif data for FileA then of course it's the same. You need to get the exif from FileB to see changes (but there won't be much exif data there) Quote Link to comment Share on other sites More sharing options...
phppup Posted December 6, 2019 Author Share Posted December 6, 2019 I know there won't be much there, but seeing the change will confirm effectiveness. I am starting with File A and altering it and overwriting it as File A again. What do I need to do to capture the EXIF from the edited version? How do I get it to grab the data aknew? Quote Link to comment Share on other sites More sharing options...
phppup Posted December 6, 2019 Author Share Posted December 6, 2019 Tried this $filename2 = $imagePath; $exif2 = exif_read_data($filename2); echo "<pre>"; print_r($exif2); echo "</pre>"; but NO RESULT. Quote Link to comment Share on other sites More sharing options...
Barand Posted December 6, 2019 Share Posted December 6, 2019 24 minutes ago, phppup said: I am starting with File A and altering it and overwriting it as File A again. Then it sounds like your rotation function is the same as you posted earlier - yes? $filename = '/images/myphoto.jpg'; $exif = exif_read_data($filesname); echo '<pre>BEFORE: ' . print_r($exif, 1) . '</pre>'; correctImageOrientation($filename); $exif = exif_read_data($filesname); echo '<pre>AFTER: ' . print_r($exif, 1) . '</pre>'; Quote Link to comment Share on other sites More sharing options...
phppup Posted December 6, 2019 Author Share Posted December 6, 2019 Correct, it is. Quote Link to comment Share on other sites More sharing options...
phppup Posted December 7, 2019 Author Share Posted December 7, 2019 Do I need to run the function (or a derivative of it) again? Is there a way to clear the exif_read_data($filesname) do that it grabs in fresh? Quote Link to comment Share on other sites More sharing options...
Barand Posted December 7, 2019 Share Posted December 7, 2019 I gave you the code to show the before and after exif data. How much of clue do you need? Quote Link to comment Share on other sites More sharing options...
phppup Posted December 7, 2019 Author Share Posted December 7, 2019 I thought so but I got the same result. I guess I missed re-running the script. Thanks PS: Like i said, CLEARLY one of those weeks. Quote Link to comment Share on other sites More sharing options...
Barand Posted December 7, 2019 Share Posted December 7, 2019 It's a simple enough process Get exif data from the original image and print it Rotate the image Get the exif data from the rotated image and print it What in there is so difficult? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.