Jump to content

Recommended Posts

Photo 1.9.1.979

CONTEXT

Batch job attaching ICC profile to a folder full of TIFFs. 
Macro selected to assign ICC without conversion. 
Files overwritten in place (they were backed up safely before commencing).


ADDITIONAL CONTEXT

TIFF files have been tagged in Windows File Explorer, including:

Title
Subject
Rating
Tags
Authors
Date Taken
Copyright

Fields contain multilingual Unicode content (mostly Japanese and English, plus others).

Hierarchical tags in "Tags" field has many tags of this type...

category/subcategory/tag;

1000+ characters in the Tags field would not be uncommon, as there are many tags and some tags are quite long.

PROBLEM

After attaching the ICC profile, the metadata for the TIFF files has been corrupted.

1. Subject field content is missing and filled with random Chinese characters.

2. Tags field content is significantly truncated, there seems to be a
   character limit (about 800 characters) which is significantly shorter 
   than that of File Explorer.

UPDATE

Have now determined that this is nothing to do with batch files, but saving files in general. Just opening a single TIFF file and clicking Save is enough to reproduce the problem.
 

Share this post


Link to post
Share on other sites

Accidentally posted this to Feedback subforum. Administration then moved it to MacOS.
Seems I forgot to tag the OS type. Apologies.

Currently exploring freeware/trial tools to see if one can act as a workaround (to swap out incorrectly 
embedded ICC profile for 3,000+ TIFF files without requiring them all to be individually retagged from scratch
for subject/content/credits afterwards).

Windows 10 Professional x64 20H2

Share this post


Link to post
Share on other sites

I don't think Affinity Photo is capable of doing this. Have you tried XnView MP? That's a very powerful program, is free for personal, non-commercial usage.

https://www.xnview.com/en/xnviewmp/


Affinity Photo 1.9.2.1035 ; Affinity Photo Beta 1.9.2.1005); Win10 Home Version:1903, Build: 18362.207: Intel Core i7-4770, 3.90GHz, 32GB Ram, Nvidia GTX 645, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

Share this post


Link to post
Share on other sites
31 minutes ago, Ron P. said:

I don't think Affinity Photo is capable of doing this. Have you tried XnView MP? That's a very powerful program, is free for personal, non-commercial usage.

https://www.xnview.com/en/xnviewmp/

It seems to be: you can run an ICC swap macro against each image in a batch operation and it is very fast (multithreaded) and reliable, it's just that when you open a TIFF and save it again in Photo, the metadata tags get corrupted when they shouldn't. As noted in the edit, it is a file save bug only and nothing to do with batch processing after all.

Share this post


Link to post
Share on other sites

Hi Paul,

So are you just Right-clicking a TIFF in Explorer > Properties > Details > Adding your tags > Opening in Affinity Photo > File > Save?

When I do that, everything is being retained.

Share this post


Link to post
Share on other sites
2 hours ago, Chris B said:

Hi Paul,

So are you just Right-clicking a TIFF in Explorer > Properties > Details > Adding your tags > Opening in Affinity Photo > File > Save?

When I do that, everything is being retained.

Yes, files have been tagged in Explorer (right click properties) and/or Windows Live Photo Gallery (used to review and amend hierarchical tags display in tree view).

As described above, the subject field is being replaced with seemingly random Chinese characters and the tags field content is being truncated.
Other fields remain intact.

As the truncation limit seems large, a file with a small number of tags might not have a problem (but Explorer allows at least 4096 characters).

--UPDATE/AMENDMENT--

I just did a quick test on a blank TIFF file, gave it bilingual Japanese/English Title and Subject fields and added 4096 random alphabetic characters to the Tags field (making sure that the last 4 characters were "FRED" to be easily spotted when truncated). A bit extreme, as I have no individual tag 4096 characters long in reality, but I do have long hierarchical tags that can add up together to 1500 characters or so.

File Explorer:

Title: ハウルの動く城 ❘ Howlʼs Moving Castle [2004]
Subject: この世界の片隅に ❘ In This Corner of the World [2016]
Tags: P6gZT6gkj...FRED (4096 chars)

Open in Affinity Photo, click Save without making any alterations:

Title: ハウルの動く城 ❘ Howlʼs Moving Castle [2004]
Subject: 渰ᘰ䱎湵䜰蕲殖‰堀‧䤀渀 吀栀椀猀 䌀漀爀渀攀爀 漀昀 琀栀攀 圀漀爀氀搀 嬀㈀ ㄀㘀崀匀
Tags: P6gZT6gkj...FRED; P6gZT6gkjZudcqJpPBafasyiDi9oSiD8Dx4s6NvTao4hLuKNfINyooEQsOc2sm8Z;

Which is interesting, because this test indicates the Tags field is actually being repeated with the repeated part truncated.

Casually scrolling through my normal hierarchical tags, I would probably just see the truncated tag at the end and not realize they are all still there, but partially repeated (rather than truncated).

Not quite as serious, because more easily correctable in Photo Gallery tree view (spot truncated extra tags then delete them rather than recreate tags from scratch), but Subject field is still lost and extra effort can lead to more uncertainty and errors, let alone wasted time.

So, running another test with a real file (bilingual Tags, semicolon separated, hierarchical depicted with "/", 1230 characters total, longest tag 260 characters), I get 1540 characters back after Save. The 17 existing tags have been somewhat reordered, 6 seemingly random tags have been repeated then appended, with all 6 repeated tags truncated to arbitrary lengths between 40 and 55 characters (originally 58 to 260 characters).

So, a tag might look like...

person/Japanese Spelling (Romaji Spelling) ❘ English Spelling;

...and be repeated as...

person/Japanese Spelling (Romaji Spelling) ❘ Engli;

...with no immediately obvious reason for truncation point (not a special character or language change boundary).

The reordering seems somewhat arbitrary as well. It would be nice if it was sorting alphabetically for better human readability, but it isn't.

Blank Test.tiff Test Result.tiff

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.