Skip to content

Untile @2x snapshots with the swapped Morton bit order - #2893

Merged
abrignoni merged 2 commits into
mainfrom
fix/ktx-2x-morton-order
Nov 25, 2026
Merged

abrignoni merged 2 commits into
mainfrom
fix/ktx-2x-morton-order

Conversation

@abrignoni

@abrignoni abrignoni commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #2887: @2x snapshots are tiled with the Morton x and y bits swapped, so App Snapshots now picks the bit order from the @2x/@3x in the file name.

  • No field with an established meaning in the KTX tells the two orders apart. The file name scale matched the manifest imageScale on every snapshot record checked.
  • The @2x order comes from one device (iPhone 11, iOS 26.2.1). Whether scale or chip decides is not established.
  • Not exercised: tiled files under Library/Caches/Snapshots, tiled .ktx with no @nx in the name, and Messages previews from a 2x phone (they keep the default order).
  • Corpus runs: falken_ios26 271, hc_ios26 283, hill_iphone15pro_ios26 655, wilkerson_iphone16_ios26 430, hc_ios18_7 207 unchanged.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

The PR appears safe to merge; the earlier renamed-snapshot issue is fixed.

Summary

App Snapshots selects the swapped Morton bit order for @2x images.

  • App Snapshots restores 2x tiled images with the matching block order.

Reviews (2) · Last reviewed commit: "Read the snapshot scale from the source ..." · Reviewed by Greptile

Tiled snapshots from a 2x device on iOS 26.2.1 hold the x and y bits
swapped inside each tile. No field with an established meaning tells the
two orders apart, so App Snapshots passes the scale from the @2x/@3x in
the file name and the reader swaps the order for scale 2. Any other or
unknown scale keeps the default order. Records App Snapshots counts on
four iOS 26 images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread scripts/artifacts/appSnapshots.py Resolved
The seeker stages a file whose path differs from another only in case as
name~case-<tag>.ktx, which hid the @2x. The scale now comes from the
source path the seeker recorded, and falls back to the staged name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abrignoni
abrignoni merged commit de12cab into main Nov 25, 2026
31 checks passed
@abrignoni
abrignoni deleted the fix/ktx-2x-morton-order branch November 25, 2026 17:23
charpy4n6 added a commit to charpy4n6/leapps-website that referenced this pull request Nov 25, 2026
- Plainer language throughout, with the format details moved to a short
  "For the technically curious" section at the end.
- Cover abrignoni/iLEAPP#2893: @2x snapshots use the swapped Morton
  order, chosen from the file name, measured on one 2x device.
- Credit Alexis Brignoni for testing across his corpus, finding iOS 26
  and the @2x order, and Yogesh Khatri for the original reader.
- Point the code link at abrignoni/iLEAPP main, pinned to a6d74561.
- Review: say truncated files still decode to a partly wrong picture,
  limit the HEAD word to the exact-count case, and label the diagram
  as a 4-piece-wide image and one corner of a tile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant