WIP: Portable image descriptions, part 1: Return image description from exif data #241
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#241
Loading…
Reference in a new issue
No description provided.
Delete branch "ilja/akkoma:portable_image_descriptions_part_1__image_description_from_exif_data"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
During attachment upload Pleroma returns a "description" field.
There was an Exiftool module, which has now been renamed to Exiftool.StripLocation
This is part of a broader "vision" where the ultimate goal is to get a following flow:
We do this by storing the description in the EXIF data. For this we need:
what's the status on this PR? it looks very useful
@sfr Thk you :)
I assume the most relevant part will be when the third part (writing to images) is also done, so I was waiting until I finish working on that one. Especially since there are things I may want to change and that's easier when it's not merged yet (as in: I won't have to care about breaking changes if it's not yet in develop or stable).
But it looks harder then I originally anticipated and I'm not sure when I'll continue working on it. If someone believes this is already useful without the third part, then I can fix the current merge conflict and take it out of WIP. It's already merged in Pleroma, so it can work on it's own.
I recently learned about descriptions in EXIF data and decided this would be a cool thing to contribute, so imagine my joy when I noticed this PR doing exactly what I wanted! <3 I was less ambitious and only wanted to have the reading part without the writing, so in particular I think it would be quite cool to have this merged in the form it is in currently. I might even take a shot at finishing the writing functionality later (is there a reason to not have this extension get an additional feature in a separate PR?).
I merged the current develop into this in https://akkoma.dev/timorl/akkoma/src/branch/elseinspe – feel free to grab that commit, or I can open a PR from there directly if you don't want to keep working on this.
One question – when I started looking into this I though the default EXIF field should be just
-Description
– is there a reason why you preferred-ImageDescription
? Or at least didn't add-Description
as a possibility?hey @timorl !
i'm glad to see there's other people interested in this. Sadly, i haven't found much time to work on Akkoma in the last year or so, and may not in the near future. If you are willing to create your own PR for it, please do! I'd be happy to see this in Akkoma as well.
For why I chose the fields I did, it's been a while. I did look around, but didn't came to a very conclusive conclusion. I chose those fields because it's what I found at the time and seemed to fit. I do remember one of the two fields I used only allowed a subset of characters, and even had a character limit. But I'm unsure. I made it in a way that a fallback is used, so it could still be changed/expanded on later, so feel free to do that if another way seems better to you. See also https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3535#note_89496
For why I was waiting for the 3rth part (write to media). It would've been a separate PR. I just didn't want to get this merged before knowing how easy the writing part would be because I didn't want an unfinished feature. But if anyone thinks this is already useful, then it can be merged for me because that means it's a perfect valid feature on its own. Maybe I was just worrying over nothing :)
If there's still questions I may be able to answer/help with, do ask! I'll try to answer as well as I can.
I created #744 then. :)
As for the fields, I looked up the main (official?, from here anyway) specification and
Description
by itself is not even an option there – this seems to be something made up byexiftool
. The newest version of the specification allows UTF-8 and arbitrary length ofImageDescription
, so it's the perfect default, you were right.with #744 merged and #746 tracking the “write” part, this can probably be closed now
Pull request closed