this post was submitted on 19 Sep 2023
37 points (97.4% liked)

Linux

48186 readers
1979 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hello! I have a bunch of photos all mixed together, and I'd like to sort them out in order to better find the ones I'm searching for without loosing half an hour. I was thinking of adding custom tags to each image (manually), like "my dog", "trip to Paris", "my friend X" etc. I'd like this tag system to be portable, filesystem-indipendent. What are my best bet?

On dolphin if I click on a file I can add a custom tag. Where is the tag stored? in the file or in some plasma configuration file, so that moving the file on my phone would loose the tags?

I searched the web but probably I don't really know how to call this, because all I found was a bunch of 11 years old threads or video tag editor (I need to do this with images)

thanks in advance!

EDIT: I have a HUGE amount of pictures to sort manually, so I'd need a GUI designed to be really quick. It probably does not exist, or if it does it won't satisfy me, so I'd probably write my own simple frontend for it, so the ideal would be a CLI tool or something QT-compatible

top 14 comments
sorted by: hot top controversial new old
[–] Extrasvhx9he@lemmy.today 9 points 1 year ago* (last edited 1 year ago) (2 children)

Think you can do this with digikam but I need to double check

Edit: straight from their docs. Also they state "Tags are stored in a database for fast access, and, the applied tags are written into IPTC data fields of the image (at least for JPEG). So you can use your tags with other programs or, in case of loss of that data in the database, the tags will be re-imported when the image is noticed by digiKam." I would do a few picture first as a test to see if it works to your liking

[–] Trent@lemmy.ml 1 points 1 year ago

Hmm, I've never seen Digikam before, but it looks pretty handy.

[–] tubbadu@lemmy.kde.social 1 points 1 year ago

this seems really interesting, I'll look into it! Thanks!

[–] 30p87@feddit.de 7 points 1 year ago* (last edited 1 year ago) (3 children)

The only option I would see to add tags to files without using some sort of picture management program that supports tags or an SQL database would be to just add raw text data to images. The image still works as eg. "IEND.B`."/"0x49454E44AE426082" marks the end of png data. Everything afterwards is ignored. You can test that by writing some text into a file (echo "Hello World!" > test.txt) and cat'ing the image + the text, eg. cat image.png test.txt > new_image.png. new_image.png will still contain the original image. Note that editing/exporting in editors will probably delete that data. Still, it could be used to add tags in eg. Json/CSV, and also extract them. That would require some work in coding, but work on any filesystem and system without additional files.

[–] Ozzy@lemmy.ml 5 points 1 year ago* (last edited 1 year ago)

This sounds like a fun hobby project, bookmarking this for later

Edit: if I will make a tool for this I will update this comment.

[–] d_k_bo@feddit.de 2 points 1 year ago

That reminds me of the aCropalypse vulnerability where parts of the uncropped image were still present in a cropped image just after the IEND stuff.

[–] tubbadu@lemmy.kde.social 2 points 1 year ago (1 children)

seems interesting, isn't there something that already uses this?

[–] 30p87@feddit.de 4 points 1 year ago

Probably not, considering it's a pretty janky solution prone to being broken by legitimate actions like editing it. Most are also fine with just using a database, maybe even selfhosting it.

[–] demesisx@infosec.pub 5 points 1 year ago

I recommend embedding something like a checksum in the filenames to prevent duplicates.

[–] tun@lemm.ee 4 points 1 year ago (1 children)

XnView has tag and filter feature.

[–] tubbadu@lemmy.kde.social 1 points 1 year ago* (last edited 1 year ago) (1 children)

thanks for the answer! how does it store the data? Will it loose it if I transfer it to my phone?

[–] tun@lemm.ee 1 points 1 year ago (1 children)

That I do not know. You have to read their website for information.

[–] Trent@lemmy.ml 5 points 1 year ago

There's an option under Settings->Metadata to have the categories written to EXIF data in the image file itself.

I just tested and the categories show up in exiftools.

[–] dr_jekell@lemmy.world 1 points 1 year ago

I use XnView MP to view and organize my photos.

Fairly certain that you can encode tags into the photo's metadata.