Jump to content
phppup

image rotation

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Tried this

   $filename2 = $imagePath;  $exif2 = exif_read_data($filename2);
    echo "<pre>";
    print_r($exif2);
    echo "</pre>";

but NO RESULT.    

Share this post


Link to post
Share on other sites
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>';

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

I gave you the code to show the before and after exif data. How much of clue do you need?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.