-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Replace exif lib #8761
Replace exif lib #8761
Conversation
Replace underlying EXIF library (rwcarlsen/goexif) with an actively developed one(dsoprea/go-exif). Add tests for disable options (date & location) while decoding EXIF. Fixes gohugoio#8586
8fa7ece
to
fd1f1a1
Compare
I'm afraid that's a bit beyond my abilities. If there'd be a binary, I could download that and test it. |
a32f609
to
0bb01ba
Compare
@bep Regression. No warnings. See:
Minimal example: git clone --single-branch -b hugo-github-issue-8519 https://github.com/jmooring/hugo-testing hugo-github-issue-8519
cd hugo-github-issue-8519
hugo server Edit: of course there are no warnings. The new lib fixed the problem. Sorry for the noise. |
I tested 2bd9e91 against Phil Harvey's collection of sample images. Of the 6924 images in his collection, only 9 gave me problems, so I think we're in pretty good shape. We were unable to decode the EXIF data in 117 of the remaining 6915 images, but at least there we no errors. Site configuration: get default EXIF fields
Site configuration: get all EXIF fields
Notes
Test sitegit clone --single-branch -b hugo-github-issue-8761 https://github.com/jmooring/hugo-testing hugo-github-issue-8761
cd hugo-github-issue-8761
hugo |
Also, do not return an error when input format isn't supported. Just return `nil` exif. Using the stream API and avoid creating the Ifd mapping and tag index every time makes it faster: ``` name old time/op new time/op delta DecodeExif-16 3.42ms ± 0% 0.65ms ± 0% -81.12% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 1.51MB ± 0% 0.59MB ± 0% -60.77% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 12.9k ± 0% 1.9k ± 0% -85.48% (p=0.029 n=4+4) ``` It's still slower than what we had, though, but correctness comes at a cost: ``` name old time/op new time/op delta DecodeExif-16 186µs ± 0% 648µs ± 1% +249.21% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 184kB ± 0% 593kB ± 0% +222.38% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 1.20k ± 0% 1.88k ± 0% +55.99% (p=0.029 n=4+4) ``` See gohugoio#8586
712fabf
to
9a00eef
Compare
Waiting for a merge of this one: dsoprea/go-exif#63 @jmooring note that the last commit I added means that it will not build for you. Thanks for the extensive test work, some of the errors looks a little odd, but we can live with those. Knowing about them means we can eventually fix them. |
Closing this. The upstream library doesn't seem to be actively maintained, and I'm certainly not prepared to take on another one. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.