Comments (19)
Nice one @dravenst, thanks for looking into it! I'll add this in soon.
Do you have a a few photos with IPTC captions for testing?
from thumbsup.
Here is a sample with caption "Pretty canyon view" in it. You can see it in Infranview (under Information->IPTC).
Thanks,-Rob
On Saturday, December 27, 2014 2:47 AM, Romain Prieto <[email protected]> wrote:
Nice one @dravenst, thanks for looking into it! I'll add this in soon.
Do you have a a few photos with IPTC captions for testing?—
Reply to this email directly or view it on GitHub.
from thumbsup.
@dravenst is there any chance you would roll this feature into thumbsup?
from thumbsup.
Sorry, dropped the ball on that one! Did I miss the link to the example file?
It should be relatively straight forward to integrate, with the code that @dravenst wrote (although thumbsup
uses graphicsmagick
, but I imagine it has similar capabilities).
from thumbsup.
Unfortunately I am not nodejs programer or I would try, but I can send you these test images with caption data to test.
from thumbsup.
I did create a fork with some new options including the feature to read captions from the image files.
from thumbsup.
Sorry I was unavailable for the last 2 months. That's awesome @dravenst, is it something we can easily merge back in?
from thumbsup.
@dravenst I just added EXIF caption support on master. You can have a look over here: http://rprieto.github.io/thumbsup/captions.html
It works well on the photos @brentrobbins provided. Would you mind pasting a photo with IPTC headers, to make sure we can cover both cases? Thanks!
from thumbsup.
Broader question: should we always display captions, or should it be an option?
Also adding an idea from #14: we could default the caption to the file name if no EXIF/IPTC caption is found. Or should that be optional too? (i.e. we actually want it to stay blank sometimes).
Suggesting
--show-captions [true|false]
--default-captions [true|false]
from thumbsup.
@rprieto I think it might be nice to have it as an option, but one enhancement I would recommend would be using the captions for the image alt tags.
from thumbsup.
Good idea, thanks! So here's the current TODO list:
- add support for EXIF captions
- update
metadata.json
with the captions so they're only parsed once (not on every build) - display captions under the photo in full screen mode
- add support for IPTC captions (which Picasa uses)
from thumbsup.
Fixed in 3a01c67.
IPTC captions are always shows if present, which is the same behaviour as EXIF captions. Some new themes could do it differently later, e.g. showing the caption underneath every thumbnail.
Some nice to have for later:
- have an option for the full screen viewer to display the filename if there is no caption
- use the caption for the image
alt
tag
from thumbsup.
Looks like this was included in a recent tagged release for npm but I just installed thumbsup from npm ( 2.0 alpha 4) and there is no caption options on the CLI nor captions showing. Does it look for XMP, EXIF or IPTC metadata or only IPTC?
For those reading this....I added description/caption to each one and the only one appearing was EXIF.
Is there a css class for stying this?
from thumbsup.
That's odd, it should be picking up both EXIF and IPTC captions (ImageDescription
and Caption-Abstract
respectively). I'll have a look to see if something broke here. Thanks for raising the issue!
from thumbsup.
From a quick test, it seems to be working well for both EXIF and IPTC. To clarify the behaviour, it shows captions in the "viewer" mode (when scrolling through large photos). Is that where you're looking, or did you expect them under the thumbnails? There is no CLI argument needed.
from thumbsup.
Yes I double checked my test image has also an IPTC tag Caption-Abstract set as well. So according to what you wrote I should be seeing both? or do if find the exif it ignore iptc?
As to styling. I figured out the lg class, but you have viewer.css loaded before ligthgallery.css. I suggest you move it and styles.css to after lightgallery.css so one can customize. Until I did that .lg-sub-html class changes in viewer.css were ignored. If your intention was not to have users change that file I'd add another custom.css to the end of the imports.
from thumbsup.
Ok, yes, IPTC Caption-Abstract is working. As you say. I deleted my exif tag and then it displayed the iptc one. So all is good.
@rprieto On this same caption topic. Have you seen fgallery? https://github.com/wavexx/fgallery
It uses xmp data and displays a title and description nicely formatted... There are better photo tagger programs out there for xmp then for exif/IPTC. I suppose it wouldn't be too hard to allow custom captions where user specifies which custom xmp tags they want to use with defaults of "title" and "caption" like fgallery uses.
from thumbsup.
I didn't know about fgallery
, I will check it out thanks! Seems similar in concept so it will be good to see what options it has and get ideas for improvements :)
Regarding the caption, you're right that Title
is a valid IPTC
field. (EDIT: actually XMP
). I'd say we should read that field as well, and display whichever one of the 3 exists. Do you want to submit a PR in input/file.js
(or model/media.js
after #58 is merged)?
Your idea of an option to specify which tags to use could be useful too, as a separate feature. Only limitation is that thumbsup is heavily based in exiftool
so we'd need to see if exiftool-json-db loads custom tags or not. Another option is to follow the principle of least surprise, and try to read the caption from as many fields as make sense, e.g. also checking IPTC:Headline
, etc. That might be an easy step to start with.
from thumbsup.
@dkebler the last update on master
reads the caption from all standard EXIF/IPTC/XMP tags. For now it only has a single "caption", which could be split at some point into title/description as you suggested - maybe after revisiting what the UI should look like.
from thumbsup.
Related Issues (20)
- Thumbsup added unecessary rotation? HOT 7
- lazy loading HOT 1
- Unable to install HOT 5
- Broken on MacOS Ventura HOT 6
- Disable download of images via UI HOT 2
- New Theme: PhotoArchive
- npm install failing clean CentOS Stream release 9 build HOT 6
- Investigate the use of ESM modules
- Read XMP "sidecar" files for meta-data HOT 1
- Link to a specific image in album view
- ffmepg video conversion error HOT 3
- Emojis in folder names not supported on MS Windows HOT 3
- installation instructions don't work; better_sqlite3.node outdated
- Unexpected error Cannot read properties of undefined (reading 'FileModifyDate') HOT 6
- Gallery generated successfully! │ │ 1 albums, 0 photos, 0 videos HOT 1
- All video files are missing in the destination HOT 3
- database is locked HOT 2
- 2.16.0 and later give TypeError: value.split is not a function HOT 3
- link-prefix ignores '..' HOT 3
- Docker image: Please install `dcraw` HOT 5
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 thumbsup.