Metadata window: list a multi-page file's groups in the file's order, so pages come 1, 2, 3 … with their profiles

Aperta Adatta ai principianti
#1,817 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
66/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Inizia in MetadataViewModel.cs da ArrangeGroups, dove i gruppi sono ordinati per Order e poi per nome con ThenBy(...). Confronta questo con il modo in cui le righe vengono raggruppate quando arrivano per la prima volta, poiché l'issue afferma che il raggruppamento preserva già l'ordine di lettura di ExifTool. Rimuovi o sostituisci l'ordinamento per nome mantenendo i gruppi denominati per primi e File per ultimo, poi controlla l'ordine dei gruppi risultante su un TIFF multipagina. L'issue offre diversi approcci possibili, quindi conferma l'ordine preferito prima di considerarlo completato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
What would you like Filee to do?

List the groups that have no name of their own in the order ExifTool reads them from the file (the order
exiftool -g1 prints them in), instead of sorting them by name. For a multi-page TIFF, the pages then come in order
(page 0, 1, 2 … 199), each followed by its own colour profile.

Groups with a name of their own (Location, Camera, Exposure, Description, Keywords, Document) stay first, and File
stays last, as now.

Why / when would you use it?

The groups are sorted as text (ArrangeGroups in MetadataViewModel.cs,
OrderBy(a => a.Order).ThenBy(a => a.Group, StringComparer.Ordinal)), so in a TIFF of more than ten pages:

  • the pages come in text order: IFD1, IFD10, IFD11, IFD2 …;
  • every page's colour profile (ICC-header, ICC-header10 … ICC_Profile9) comes before page 1, sorted as text too.

This happens on main today with a 12-page TIFF (652 fields):

A 12-page TIFF on main, searched for Image Width: Camera, IFD1, IFD10, IFD11, IFD2, IFD3

With #1289 a 200-page TIFF opens too (10,804 fields read by ExifTool 12.58), and page 2 is then 914 groups down. Rendered
with the app's own code in the headless tests, using search to show one line per group:

Now Proposed
Search "Image Width": one line per page Now: Camera, IFD1, IFD10, IFD100, IFD101 Proposed: Camera, IFD1, IFD2, IFD3, IFD4
Search "RGB": each page and its profile Now: Camera, then ICC-header, ICC-header10, ICC-header100 Proposed: Camera, ICC-header, ICC_Profile, IFD1, ICC-header2, ICC_Profile2

The same text order puts Track10 before Track2 in a video with ten or more tracks, and Chapter10 before Chapter2.

Ideas for how it could work

The rows already arrive in ExifTool's order, and the grouping keeps each group where it first appears, so this is
the ThenBy(...) dropped (OrderBy keeps the order of equal entries).

What else it changes, so you can weigh it: an ordinary photo's other groups follow the file too. For a JPEG with a
thumbnail, IPTC, XMP and a Display P3 profile:

  • now: ICC-header, ICC_Profile, IFD1, JFIF, Photoshop, XMP-photoshop, XMP-x, XMP-xmp;
  • proposed: JFIF, IFD1, Photoshop, XMP-x, XMP-photoshop, XMP-xmp, ICC-header, ICC_Profile.

The first screen of the window is the same in both (the named groups first), pixel for pixel in these renders.

Other ways, if you'd rather:

  • Sort numbers as numbers (IFD2 before IFD10, Track2 before Track10). The pages come in order, but every profile
    still comes before page 1.
  • Show a page and its profile under a page heading (or a page picker). Clearer for scans, but it needs new
    strings, and ExifTool's numbers don't map to pages reliably: a profile's number counts the profiles read so far, and
    IFD1 is a page only in a TIFF (in a JPEG it's the thumbnail).

Not covered either way: a later page's ExifIFD or GPS has no number, so it shares the Exposure or Location group with
page 0's. My test files have none, so I haven't seen how that looks.

I can open a PR for whichever you prefer.

Lingua principale
C#
Stelle
3.6k
Fork
192
Merge medio
14h 23m
PR unite (30g)
458

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di KnifeLemon/Filee

Tutte le issue di KnifeLemon/Filee

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.