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

未关闭 适合新手
#1,817 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
66/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
desktop

调研方向

从 MetadataViewModel.cs 中的 ArrangeGroups 开始,这里的分组先按 Order、再按名称用 ThenBy(...) 排序。将其与行刚到达时的分组方式进行比较,因为 issue 说该分组已经保留了 ExifTool 的读取顺序。删除或替换按名称的排序,同时保持具名分组在前、File 在最后,然后在多页 TIFF 上检查最终的分组顺序。该 issue 提供了几种可能的方法,所以在将其视为完成之前,请确认首选顺序。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
3.6k
派生
192
平均合并
14 小时 23 分钟
30 天内合并 PR
458

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

KnifeLemon/Filee 的其他 Issue

查看 KnifeLemon/Filee 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。