-
-
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 underlying Exif library #8586
Comments
I have labeled this Anyhow, PR is welcome. We should try to preserve the existing API if possible. If we need to extend it for the IPTC data, we will do that. |
Hi, I'd like a shot at this. |
Yes, that would be a good approach. |
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
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
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
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
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
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
Also, do not return an error when input format isn't supported. Just return `nil` exif. Using the stream API makes it a little faster: ``` name old time/op new time/op delta DecodeExif-16 1.94ms ± 1% 1.81ms ± 1% -6.74% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 1.51MB ± 0% 1.13MB ± 0% -25.32% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 12.9k ± 0% 12.9k ± 0% -0.15% (p=0.029 n=4+4) ``` It's still much slower than what we had: ``` name old time/op new time/op delta DecodeExif-16 108µs ± 1% 1857µs ± 2% +1624.52% (p=0.029 n=4+4) name old alloc/op new alloc/op delta DecodeExif-16 184kB ± 0% 1130kB ± 0% +513.72% (p=0.029 n=4+4) name old allocs/op new allocs/op delta DecodeExif-16 1.20k ± 0% 12.91k ± 0% +972.82% (p=0.029 n=4+4) ``` See gohugoio#8586
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
Closes gohugoio#10855 Closes gohugoio#8586
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
Closes gohugoio#10855 Closes gohugoio#8586 Closes gohugoio#8996
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I suggest to replace the current Exif library, which has not been worked on in the last two years and poses some problems with
https://github.com/dsoprea/go-exif
That one is actively developed and seems to be able to read IPTC data, too. Which would open up a lot more possibilities for image handling.
Cf. https://discourse.gohugo.io/t/chance-of-changing-the-exif-module/33112
The text was updated successfully, but these errors were encountered: