Writing IPTC data

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

cday
XnThusiast
Posts: 1561
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Writing IPTC data

Postby cday » Sun Jul 02, 2017 6:37 am

When IPTC data is written to a JPEQ, is the source image opened and resaved?

The practical consideration is whether IPTC data can be written and edited with no risk of the original image quality being reduced...


Code: Select all

-iptc_set tag value : Set value to IPTC tag
-iptc_add tag value : Add value to IPTC tag

User avatar
XnTriq
Moderator & Librarian
Posts: 5087
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Writing IPTC data

Postby XnTriq » Sun Jul 02, 2017 8:30 pm

  1. Find a JPEG without any IPTC metadata (Test.jpg).
  2. Add an IPTC tag to Copy of Test.jpg.
  3. Run XnView's Clean command (Browser: EditMetadata) on both Test.jpg and Copy of Test.jpg to remove just the IPTC metadata.
  4. Do a binary comparison (with FC or AptDiff) of Test.jpg and Copy of Test.jpg.

PS:


cday
XnThusiast
Posts: 1561
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Writing IPTC data

Postby cday » Sun Jul 02, 2017 8:53 pm

Thank you but I was hoping that Pierre could provide an answer without any effort on my part! :D

My enquiry really relates to NicoPL's thread Batch convert seems to alter the quality even when no action is performed where he is seeking a way of scripting batch writing of IPTC parameters without losing JPEG image quality.

But I think there are probably better solutions to his problem, either batch writing the IPTC directly as suggested in the thread by Pierre and PP0815, or, as saving with the setting 'Use estimated quality (When possible)' isn't working for his images, saving with a Quality setting that produces a similar file size to the original file and then confirming that in practice there is [probably] no perceptible loss of image quality...

I need to add those comments to the linked thread when I have time, but meanwhile it might be useful to know if an NConvert script could provide a solution... :?:

User avatar
xnview
Author of XnView
Posts: 28052
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Writing IPTC data

Postby xnview » Mon Jul 03, 2017 4:10 pm

cday wrote:

Code: Select all

-iptc_set tag value : Set value to IPTC tag
-iptc_add tag value : Add value to IPTC tag

Image is not re-compress in this case
Pierre.


Return to “NConvert”

Who is online

Users browsing this forum: No registered users and 2 guests