This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 23 - Pages: 2 [ Previous | 1 2 ] - Last Post: 29-Dec-2018 22:50 Last Post By: RobM Threads: [ Previous | Next ]
jGromit

Posts: 8,622
Registered: 31-Jan-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 28-Dec-2018 22:15   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Out of curiosity I edited an image to add some IPTC metadata and then looked at the metadata listed in jAlbum. All of the IPTC data I entered is already copied into an XMP field ....

Yes, that does happen if you add images to an album project, and have your preferences set to copy metadata to the xmp.

Where things get tricky is when you have an existing project in which those options had not been selected when the images were added.

Outside of jAlbum, add an IPTC Caption to an image file. Then in jAlbum, do not tell it to copy metadata to xmp (in the Preferences). Add the image, choose IPTC Caption as the comment source, and refresh the display to satisfy yourself that the comment is being picked up. Now turn the "copy to xmp" preference back on. At this point, the only way to get jAlbum to write out the xmp comment is to make a change to the comment. Even switching comment sources back and forth doesn't do the trick.

The method is pretty simple:
private void writeXMP(AlbumObject ao) {
	for(AlbumObject obj : ao.getChildren()) {
		if(obj.isIncluded()) {
			if(obj.isFolder()) writeXMP(obj);
			else if(obj.getCategory() == Category.image) {
				obj.copyFileMetadataToXmp();
			}
		}
	}
}
jGromit

Posts: 8,622
Registered: 31-Jan-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 28-Dec-2018 22:30   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Yes, that does happen if you add images to an album project, and have your preferences set to copy metadata to the xmp.

I take that back. I added an IPTC Caption to an image outside of jAlbum. Then in jAlbum, I told it to copy the file metadata to xmp, and to use IPTC Caption as the comment source. I added the image, and my IPTC Caption showed up as the comment. But "List metadata" shows no xmp comment.
RobM

Posts: 3,348
Registered: 4-Aug-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 00:08   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment IPTC to XMP.bsh (1.1 KB)
Your script converted to an external tool, as attached.
jGromit

Posts: 8,622
Registered: 31-Jan-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 00:40   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
We'll get back to you shortly. Maybe towards the end of 2021. ;)

So I lied. A nice little tool to take care of the job, and it's still 2018! It's another Festivus Miracle!!
Steerpike58

Posts: 11
Registered: 28-Nov-2015
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 20:25   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Sounds promising!

I'm familiar with bash scrips from when I do work on Linux boxes, but I use a windows 10 box for all my imaging work. A quick search suggests a variety of tools to get bash support on windows, the most promising seems to be "At //Build 2016, Microsoft announced the ability to run native Bash and GNU/Linux command-line tools directly on the new Windows Subsystem for Linux (WSL), " (from:
https://blogs.msdn.microsoft.com/commandline/2016/04/06/bash-on-ubuntu-on-windows-download-now-3/ )

Would that be the most expedient way forward or is there an easier way staring me in the face?

I'm encouraged to read in this thread, though, that if I ADD a new project to jAlbum, the IPTC comments DO get copied to the XMP area automatically. I had tested with an existing project, hence I didn't see this. Since I don't have many existing jAlbum projects (yet), that may just be the best path forward. I just created a new test project, and linked to a new directory full of images. I wrote IPTC comments to all those images before starting. Despite having 'write xmp metadata to files', and also 'IPTC Caption' as my comment source, no XMP data was written to my jpeg files. So what exactly is the sequence to follow to get IPTC data written to XMP for a 'new' project?

Thanks for the help!

Edited by: Steerpike58 on 29-Dec-2018 11:26

Edit to Add - rereading the entire thread, I see that you corrected yourself: "I take that back. I added an IPTC Caption to an image outside of jAlbum. Then in jAlbum, I told it to copy the file metadata to xmp, and to use IPTC Caption as the comment source. I added the image, and my IPTC Caption showed up as the comment. But "List metadata" shows no xmp comment."

So that's not going to work. OK, so I just need to figure how to run the bash script then …

Edited by: Steerpike58 on 29-Dec-2018 11:28
jGromit

Posts: 8,622
Registered: 31-Jan-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 20:40   in response to: Steerpike58 in response to: Steerpike58
Helpful
  Click to reply to this thread Reply
Stop what you're doing! jAlbum has the inherent ability to run these kinds of tools, on any platform - they're BeanShell scripts. No need to install any other software.

From within jAlbum, open the config directory - Tools, Open directories, Config directory. If there's no tools subdirectory, create it. Then plant RobM's tool in that subdirectory, shut down jAlbum, and launch it again. It should then show up as an entry on the Tools > External Tools menu.

Try it out with a little test project.
Steerpike58

Posts: 11
Registered: 28-Nov-2015
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 21:00   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Will do - thanks!

Edit To Add - worked like a charm! Whether I choose to use jAlbum or not for my future projects, I just bought a license to say 'thanks' for the great support! Awesome product, Awesome support!

Edited by: Steerpike58 on 29-Dec-2018 12:10
Steerpike58

Posts: 11
Registered: 28-Nov-2015
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 21:13   in response to: Steerpike58 in response to: Steerpike58
 
  Click to reply to this thread Reply
New script provided in this thread, which can be installed and run from within jAlbum to allow the bulk-copy of IPTC comments to the XMP Comment area. Excellent!
RobM

Posts: 3,348
Registered: 4-Aug-2006
Re: Updating IPTC data for multiple images at once in 'Explore' view
Posted: 29-Dec-2018 22:50   in response to: Steerpike58 in response to: Steerpike58
 
  Click to reply to this thread Reply
There are other useful tools available see this wiki page for details on using tools and of course those listed in the external tools forum. Have a peek, you might find something you like.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums