Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve exif data #157

Open
claviska opened this issue Jan 10, 2017 · 6 comments
Open

Preserve exif data #157

claviska opened this issue Jan 10, 2017 · 6 comments

Comments

@claviska
Copy link
Owner

Because of the way GD works, exif data is discarded when an image is saved. It would be really nice to write this data back to the file when saved as image/jpeg.

On load, $this->exif gets populated from exif_read_data(), so we have the info. We just need a way to write it back to the JPEG after it gets generated.

There are some seemingly bloated libraries for reading/writing exif data. I'd like to find a lightweight solution to handle this (prefer no third party deps).

  • Add setExif() method (in case you want to overwrite or change it).
  • Add removeExif() method (in case you want to remove it from the image).
  • Ensure width, height, orientation, etc. exif properties are updated automatically when the image is resized or rotated.
@karsasmus
Copy link

Hi Cory, perhaps this Stackoverflow answer could help a little bit

@claviska
Copy link
Owner Author

Yep, looks like this comment might be a good starting point. Thanks!

@johnabela
Copy link

Would absolutely love to see this get implemented - probably my #1 feature request for SimpleImage.

@claviska claviska mentioned this issue Dec 8, 2017
@johnabela
Copy link

Been almost a year since this was last discussed, any update on getting this incorporated @claviska ?

@claviska
Copy link
Owner Author

claviska commented Dec 4, 2018

It's not on my radar right now (I'm in the middle of a major rewrite of my SaaS). I was hoping someone with more Exif experience would jump in.

@johnabela
Copy link

Sounds good mate, totally understand. Currently rebuilding a good part of my own base code from the ground up. I will try to invest some time to seeing if I can get some code integrated into SimpleImage that deals with getting this to work. I think my main thing is just getting autoOrient() to work and not have the exif data go bye-bye. It is nice to just run autoOrient() on new uploads just to make sure they are not all wonky, but it sucks having the geo and camera exif killed off, just to perform that simple operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants