swift-snapshot-testing icon indicating copy to clipboard operation
swift-snapshot-testing copied to clipboard

Normalize image color spaces before comparison

Open ejensen opened this issue 2 years ago • 4 comments

Overview

Use the sRGB converted snapshot when doing the perceptual comparison. This reduces the chances of failures when comparing snapshots using different color spaces.

This colorspace normalization technique was originally introduced in https://github.com/pointfreeco/swift-snapshot-testing/pull/446 and this PR extends it to both the reference and new images when performing perceptual image comparison.

Unit tests were added to verify that images in the P3 and sRGB colors spaces match after colorspace normalization.

Related Issues

  • https://github.com/pointfreeco/swift-snapshot-testing/issues/313#issuecomment-1258535742

ejensen avatar Oct 22 '22 01:10 ejensen

Hey. Should we merge this PR after the rebase? Looks like it was approved, but never merged

pilot34 avatar Oct 02 '23 08:10 pilot34

@stephencelis Please, is there a plan to merge this?

Kaspik avatar Oct 11 '23 16:10 Kaspik

@stephencelis I will bump this topic cause there was no answer from few months

Could you provide information what is blocking you from merging it into the main branch?

It will be nice feature/fix that could reduce lots of issues.

Thanks!

ogiba avatar Apr 22 '24 09:04 ogiba

+1 please merge :)

brucerune avatar May 22 '24 18:05 brucerune