Comments (3)
Did some further testing. Saved more person-metadata to the using "Tag That Photo". This makes the display correct in PiGallery.
Once the data is rewritten by exiftool, PiGallery displays it wrongly. This goes for both exiftool Windows executable and the ubuntu version under WSL
WSL (ubuntu)
$ cp 2023-08-27-120000-example-ttp.jpg 2023-08-27-120000-example-ttp-exifcopy.jpg
$ exiftool -all= -tagsfromfile @ -all:all -IPTC:All -XMP:All -ColorSpaceTags -F -codedcharacterset=utf8 2023-08-27-120000-example-ttp-exifcopy.jpg
cmd.exe (windows 10)
>copy 2023-08-27-120000-example-ttp.jpg 2023-08-27-120000-example-ttp-exifwincopy.jpg
>exiftool -all= -tagsfromfile @ -all:all -IPTC:All -XMP:All -ColorSpaceTags -F -codedcharacterset=utf8 2023-08-27-120000-example-ttp-exifwincopy.jpg
When sorting and comparing the exif data as displayed by exiftool, there are no differences.
This is confusing, because I think "Tag That Photo" uses exiftool under the hood
from pigallery2.
I had the chance to play around a bit.
Converting variable "name" in line 487 of MetaDataLoader.ts from Ascii to utf-8 at least seems to fix the problem when viewed in the log. Without this conversion the same wrong characters show up in the log, as show up in the UI
https://github.com/bpatrik/pigallery2/blob/3489f1d55ad4b7a5e83149887c665f7a5beddef0/src/backend/model/fileaccess/MetadataLoader.ts#L487C18-L487C18
Logger.info(LOG_TAG, 'name: ' + name);
Logger.info(LOG_TAG, 'name converted from ascii to utf-8: ' + Buffer.from(name, 'ascii').toString('utf-8'));
Logger.info(LOG_TAG, 'name converted from ascii to utf-8 twice: ' + Buffer.from(Buffer.from(name, 'ascii').toString('utf-8'), 'ascii').toString('utf-8'));
So it could be that the library that reads the metadata assumes that it is ascii-encoded, which is why the conversion works. According to https://exiftool.org/TagNames/MWG.html, the MWG group recommends ASCII, but exiftool uses UTF-8. This may be the cause of the assumed ASCII format.
Contrary to the EXIF specification, the MWG recommends that EXIF "ASCII" string values be stored as UTF-8. To honour this, the exiftool application sets the default internal EXIF string encoding to "UTF8" when the MWG module is loaded, but via the API this must be done manually by setting the CharsetEXIF option.
I'm not yet comfortable enough with the code to suggest a solution and create pull request with a correction, but wanted to share my findings.
from pigallery2.
Fixed with #826
from pigallery2.
Related Issues (20)
- Images Missing "Date/Time Original" All Arbitrarily Assigned the Same Date HOT 28
- "Thumbnail folder error" & "Unknown indexing error for: / " on TrueNAS HOT 1
- edge-alpine DB fails with an HEIC image for media_entity.metadataSizeWidth constraint HOT 16
- Watch filesystem to avoid reindexing HOT 1
- Blog not shown on correct position in a search
- Increase sharingKey complexity HOT 5
- Periodic jobs not working/saving settings HOT 1
- Docker is not building HOT 3
- server error and container crash when searchin with special characters HOT 2
- Search by date filters by UTC timestamp HOT 3
- PiGallery2 stopped working - health issue - docker update ? HOT 4
- *.md blog feature doesn't work in subfolder HOT 6
- Node error starting pigallery2 HOT 6
- Cannot start pigallery2 after a node upgrade HOT 7
- Unable to Index Symlinked Directory HOT 2
- Refinement of grouping by date
- Improving keyword filtering HOT 1
- Date slider not working in Firefox HOT 1
- question: How to filter out "ignored" folder after the fact HOT 2
- Add a faces_count keyword HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pigallery2.