Screenshots: bring iOS 27's 16-bit P3 screenshots down to 8 bits - #284
Merged
Merged
Conversation
On iOS 27 a device screenshot is 16-bit Display P3, and `sips --setProperty bitsPerSample 8` writes nothing for it while still exiting 0, so the pixel reader was handed the 16-bit file and stopped. Matching the image to its own colour profile writes it at 8 bits with its colours unchanged; the depth is now read back instead of trusting sips's exit code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
renrenmimi
added a commit
that referenced
this pull request
Oct 2, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/device-screenshot.shstopped at the pixel check on the phone tonight. The phone is on iOS 27, where a device screenshot is 16-bit Display P3.sips --setProperty bitsPerSample 8writes nothing for that file and still exits 0, sosample-pixels.pywas handed the 16-bit file and raised.The script now matches the image to its own colour profile (
sips --matchTo "…/Display P3.icc"). sips writes the result at 8 bits, with the colours unchanged. It then reads the depth back instead of trusting the exit code.Checked on tonight's 16-bit screenshot:
sample-pixels.pyreads it, and its numbers match a by-hand conversion;bash -npasses.🤖 Generated with Claude Code