-
Notifications
You must be signed in to change notification settings - Fork 379
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
added an "auto_rotate" filter based on exif data #254
Conversation
*/ | ||
function load(ImageInterface $image, array $options = array()) | ||
{ | ||
$exifData = exif_read_data("data://image/jpeg;base64," . base64_encode($image->get('jpg'))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this logic available in Imagine?
/cc @avalanche123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, not yet, there are several open PRs for metadata support, but non of them is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm doesn't seem like @avalanche123 is stil active .. @romainneutron ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a WIP here php-imagine/Imagine#266
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah just found this ticket too .. so are you hopeful this will get merged soon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm highly open for such feature, we just need to find a nice way to introduce metadata.
I'm a bit busy currently, but I hope we could find some time to merge this in the next weeks. This is the messing feature of Imagine 0.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@digitalkaoz can you maybe see if you can push this imagine PR forward?
ping @lsmith77 :) |
ping again? @lsmith77 |
Could you please apply PSR-2 coding style? I'm fine with having the read of the meta data directly in here for now. As soon as Imagine provides this feature, this loader has to be refactored. |
me too |
done... |
@havvg could you update |
I will. |
added an "auto_rotate" filter based on exif data
@makasim develop has been updated. |
For you information, Imagine now provides metadata access, see https://imagine.readthedocs.org/en/latest/usage/metadata.html |
ill provide a patch these days, thanks for the info :) |
...from the docs...
The
auto_rotate
filterThe auto_rotate filter rotates the image based on its EXIF data. (this filter should be called as early as possible)
Configuration looks like this: