Page 1 of 1

Writing IPTC data

Posted: Sun Jul 02, 2017 6:37 am
by cday
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

Re: Writing IPTC data

Posted: Sun Jul 02, 2017 8:30 pm
by XnTriq
  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:

Re: Writing IPTC data

Posted: Sun Jul 02, 2017 8:53 pm
by cday
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... :?:

Re: Writing IPTC data

Posted: Mon Jul 03, 2017 4:10 pm
by xnview
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