-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Extract GPS data from EXIF #33511
Extract GPS data from EXIF #33511
Conversation
b4da031
to
c096b1d
Compare
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.
A few remarks.
Regarding copying the stream to a temp one, I have no idea if this is avoidable.
c096b1d
to
458a373
Compare
Just adding my two cents, but the recent changes by @CarlSchwan also made the size property from the EXIF metadata available as a DAV property (see here). Wouldn't it be useful to expose the GPS coordinates to the WebDAV PROPFIND as well? @CarlSchwan @icewind1991 |
that's the plan already, it should be automatically exposed once it exists in the database |
c47d652
to
02a6676
Compare
Possible performance regression detected Show Output
|
02a6676
to
6527080
Compare
Possible performance regression detected Show Output
|
6527080
to
dad7296
Compare
Possible performance regression detected Show Output
|
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.
👍 please double check the perf bot
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.
Apart from small change on logger, approved
dad7296
to
f1ad019
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Louis Chemineau <louis@chmn.me>
f1ad019
to
54b6d07
Compare
@artonge please also make sure the new CLI args are present in the documentation |
We want to use this on iOS and Android clients to fetch location data without downloading the full res image + exif. To me it looks like this code only does the process of obtaining the info but we can't request it from client. Is this added somewhere else? |
I had to do a workaround to read EXIF data properly:
Some work has been done by @CarlSchwan here.But theexif_read_data
call does not work, and probably never worked. One possible explanation is that the resource is wrapped. From the README:> Note: due to php's internal stream buffering the $count passed to the read callback will be equal to php's internal buffer size (8192 on default) an not the number of bytes requested by fopen()As it works when the stream is not wrapped, it might be an explanation for why theexif_read_data
call fails.To make it work, I copy the stream into a tmp stream without wrappers before passing it to exif_read_data.✔️ I found a workaround by calling
stream_set_chunk_size($fileDescriptor, 1);
before we read the stream. No idea why it works, but it does, and I am reverting it right after to prevent any side effect outside our use case.I also cherry-picked @CarlSchwan PR that adds a CLI command to extract metadata #32309