Skip to content

fix(screenshot): normalize white detection to sRGB#710

Merged
Kikobeats merged 1 commit intomasterfrom
screenshot
Mar 17, 2026
Merged

fix(screenshot): normalize white detection to sRGB#710
Kikobeats merged 1 commit intomasterfrom
screenshot

Conversation

@Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Mar 17, 2026

Convert images to sRGB before reading raw pixels so white screenshot detection uses consistent RGB values across inputs with different color profiles.


Note

Medium Risk
Changes the pixel values used for blank/white screenshot detection by forcing sRGB conversion, which could alter white/near-white classification for some inputs with embedded color profiles.

Overview
Normalizes blank screenshot detection by converting input images to sRGB via Sharp’s pipelineColourspace('srgb') before extracting raw pixels.

This makes the “white screenshot” check consistent across images with different color profiles, but may change pass/fail results for some borderline near-white screenshots.

Written by Cursor Bugbot for commit 7bba361. This will update automatically on new commits. Configure here.

Convert images to sRGB before reading raw pixels so white screenshot detection uses consistent RGB values across inputs with different color profiles.
@Kikobeats Kikobeats merged commit ecfec2d into master Mar 17, 2026
22 checks passed
@Kikobeats Kikobeats deleted the screenshot branch March 17, 2026 16:42
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