fix(convert): a conversion never changes what Chronos reads from a photo

Owner review 2, phase 4b, fix round 3 (codecs).

Chronos's decoders never read an ICC profile: they take code values through
the sRGB curve and float samples as they are. Round 2 wrote a float TIFF's
values with its profile's own curves, so after a Replace the renders,
thumbnails, analyses and deflicker of an Adobe RGB, ProPhoto or gamma-1.0
float TIFF saw other pixels (up to 2.7 EV darker, shadows lifted). Every
converted file now holds the values the decoders read from the original, as
they read them back, and says truthfully what they are:

- A JPEG or TIFF-16 keeps the codes of code values and carries the original's
  profile. Float values are written as sRGB codes with a profile made for
  them: the original's colorants and media white with the sRGB curve. A gray
  profile's codes are kept, its curve carried as an RGB profile (they were
  converted to sRGB before, which changed them too).
- A Linear DNG, whose matrices Chronos develops it with as well, takes only
  values that are sRGB's as the decoders read them; any other profile is
  refused as color_profile instead of converted to colours Chronos would then
  show differently.
- A profile with colorant tags that convert nothing is never sRGB by its name.
- A float file with NaN or infinite samples fails as damaged data instead of
  being written black (and spending a DNG's headroom).

The plan and the decoders behind it:

- TooLarge and WorstBytes answer any size, int.MaxValue sides included,
  without a product that wraps around; the worst case saturates.
- A frame another host flagged unreadable (the server, for a CMYK or CIELab
  TIFF its reader refuses) is asked again with a small decode where the
  conversion has other decoders (WIC on a PC), so a PC still converts it.
  The too_large sentences say "or Chronos reads back" (en, it).
- WIC's TIFF decoder decodes an unknown compression as zeros, does not undo
  the floating-point predictor of Photoshop's 32-bit files and reads 32-bit
  integers as floats, all without an error: such TIFFs are left to the
  managed reader, on the desktop as in conversions, never black or noise.
- A conversion's WIC probe reads the headers (decoder, first frame's oriented
  size, pixel format), so the size bound applies to what only WIC reads; a
  read error stays a read error (inaccessible), never a verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-03 09:36:00 +01:00
1 parent 4dd3050334
commit b471a33bfc
16 files changed
+1341 -330

No files matched your search

+4 -3
View File
@@ -47,13 +47,14 @@
<data name="Archive.Convert.Done.other" xml:space="preserve"><value>{0:N0} sequences converted</value></data>
<data name="Archive.Convert.Failed.Changed" xml:space="preserve"><value>The photo no longer matches the copy that was archived; verify the sequence.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.ColorProfile" xml:space="preserve"><value>Its colour profile can be neither kept nor converted in this format.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.Damaged" xml:space="preserve"><value>Its pixels hold values that are not numbers: the file is damaged.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.EightBit" xml:space="preserve"><value>This computer develops this RAW at 8 bits only, too few for a 16-bit file; JPEG converts it.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.Full" xml:space="preserve"><value>The archive's disk is full.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.NoDecoder" xml:space="preserve"><value>No decoder on this computer reads it at full resolution.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.NotVerified" xml:space="preserve"><value>The converted file did not read back as it was written.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.Other" xml:space="preserve"><value>The converted file could not be made.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.PreviewOnly" xml:space="preserve"><value>This computer reads it only from its embedded preview: convert it on a PC that reads it at full resolution.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.TooLarge" xml:space="preserve"><value>It is larger than this format or the memory for one photo can hold.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.TooLarge" xml:space="preserve"><value>It is larger than this format holds, than Chronos reads back or than the memory for one photo can hold.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Failed.Unreadable" xml:space="preserve"><value>The photo could not be decoded.</value><comment>long: why a photo was not converted, in the job log</comment></data>
<data name="Archive.Convert.Format" xml:space="preserve"><value>Format</value></data>
<data name="Archive.Convert.Heading.one" xml:space="preserve"><value>Convert {0:N0} sequence</value></data>
@@ -73,7 +74,7 @@
<data name="Archive.Convert.NotCopied.NoNativeDecoder" xml:space="preserve"><value>Photos of a format this computer cannot read at full resolution are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.PreviewOnly" xml:space="preserve"><value>Photos read only from their embedded preview here are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.SameFormat" xml:space="preserve"><value>Photos already in this format are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.TooLarge" xml:space="preserve"><value>Photos larger than this format can hold are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.TooLarge" xml:space="preserve"><value>Photos larger than this format holds or Chronos reads back are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.Undecodable" xml:space="preserve"><value>Unreadable photos are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.Unhashed" xml:space="preserve"><value>Photos never verified are not copied into the new sequence; verify the sequence first.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopiedPhotos.one" xml:space="preserve"><value>{0:N0} not copied</value><comment>photos a conversion into a new sequence leaves out of it</comment></data>
@@ -94,7 +95,7 @@
<data name="Archive.Convert.Skipped.NoNativeDecoder" xml:space="preserve"><value>Photos of a format this computer cannot read at full resolution stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.PreviewOnly" xml:space="preserve"><value>Photos read only from their embedded preview here stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.SameFormat" xml:space="preserve"><value>Photos already in this format stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.TooLarge" xml:space="preserve"><value>Photos larger than this format can hold stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.TooLarge" xml:space="preserve"><value>Photos larger than this format holds or Chronos reads back stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.Undecodable" xml:space="preserve"><value>Unreadable photos stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.Unhashed" xml:space="preserve"><value>Photos never verified stay as they are; verify the sequence first.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.SkippedPhotos.one" xml:space="preserve"><value>{0:N0} skipped</value><comment>photos a conversion leaves as they are</comment></data>
+4 -3
View File
@@ -44,13 +44,14 @@
<data name="Archive.Convert.Done.other" xml:space="preserve"><value>{0:N0} sequenze convertite</value></data>
<data name="Archive.Convert.Failed.Changed" xml:space="preserve"><value>La foto non corrisponde più alla copia archiviata; verifica la sequenza.</value></data>
<data name="Archive.Convert.Failed.ColorProfile" xml:space="preserve"><value>Il suo profilo colore non si può né conservare né convertire in questo formato.</value></data>
<data name="Archive.Convert.Failed.Damaged" xml:space="preserve"><value>I suoi pixel contengono valori che non sono numeri: il file è danneggiato.</value></data>
<data name="Archive.Convert.Failed.EightBit" xml:space="preserve"><value>Questo computer sviluppa questo RAW solo a 8 bit, troppo pochi per un file a 16 bit; JPEG lo converte.</value></data>
<data name="Archive.Convert.Failed.Full" xml:space="preserve"><value>Il disco dell'archivio è pieno.</value></data>
<data name="Archive.Convert.Failed.NoDecoder" xml:space="preserve"><value>Nessun decodificatore di questo computer la legge a piena risoluzione.</value></data>
<data name="Archive.Convert.Failed.NotVerified" xml:space="preserve"><value>Il file convertito non si è riletto come era stato scritto.</value></data>
<data name="Archive.Convert.Failed.Other" xml:space="preserve"><value>Non è stato possibile creare il file convertito.</value></data>
<data name="Archive.Convert.Failed.PreviewOnly" xml:space="preserve"><value>Questo computer la legge solo dalla sua anteprima incorporata: convertila su un PC che la legga a piena risoluzione.</value></data>
<data name="Archive.Convert.Failed.TooLarge" xml:space="preserve"><value>È più grande di quanto questo formato o la memoria per una foto possano contenere.</value></data>
<data name="Archive.Convert.Failed.TooLarge" xml:space="preserve"><value>È più grande di quanto questo formato possa contenere, Chronos possa rileggere o la memoria per una foto possa contenere.</value></data>
<data name="Archive.Convert.Failed.Unreadable" xml:space="preserve"><value>Non è stato possibile decodificare la foto.</value></data>
<data name="Archive.Convert.Format" xml:space="preserve"><value>Formato</value></data>
<data name="Archive.Convert.Heading.one" xml:space="preserve"><value>Converti {0:N0} sequenza</value></data>
@@ -70,7 +71,7 @@
<data name="Archive.Convert.NotCopied.NoNativeDecoder" xml:space="preserve"><value>Le foto di un formato che questo computer non legge a piena risoluzione non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.PreviewOnly" xml:space="preserve"><value>Le foto lette qui solo dalla loro anteprima incorporata non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.SameFormat" xml:space="preserve"><value>Le foto già in questo formato non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.TooLarge" xml:space="preserve"><value>Le foto più grandi di quanto questo formato possa contenere non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.TooLarge" xml:space="preserve"><value>Le foto più grandi di quanto questo formato possa contenere o Chronos possa rileggere non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.Undecodable" xml:space="preserve"><value>Le foto illeggibili non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.Unhashed" xml:space="preserve"><value>Le foto mai verificate non vengono copiate nella nuova sequenza; verifica prima la sequenza.</value></data>
<data name="Archive.Convert.NotCopiedPhotos.one" xml:space="preserve"><value>{0:N0} non copiata</value></data>
@@ -91,7 +92,7 @@
<data name="Archive.Convert.Skipped.NoNativeDecoder" xml:space="preserve"><value>Le foto di un formato che questo computer non legge a piena risoluzione restano come sono.</value></data>
<data name="Archive.Convert.Skipped.PreviewOnly" xml:space="preserve"><value>Le foto lette qui solo dalla loro anteprima incorporata restano come sono.</value></data>
<data name="Archive.Convert.Skipped.SameFormat" xml:space="preserve"><value>Le foto già in questo formato restano come sono.</value></data>
<data name="Archive.Convert.Skipped.TooLarge" xml:space="preserve"><value>Le foto più grandi di quanto questo formato possa contenere restano come sono.</value></data>
<data name="Archive.Convert.Skipped.TooLarge" xml:space="preserve"><value>Le foto più grandi di quanto questo formato possa contenere o Chronos possa rileggere restano come sono.</value></data>
<data name="Archive.Convert.Skipped.Undecodable" xml:space="preserve"><value>Le foto illeggibili restano come sono.</value></data>
<data name="Archive.Convert.Skipped.Unhashed" xml:space="preserve"><value>Le foto mai verificate restano come sono; verifica prima la sequenza.</value></data>
<data name="Archive.Convert.SkippedPhotos.one" xml:space="preserve"><value>{0:N0} esclusa</value></data>