Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: happo/lcs-image-diff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.1
Choose a base ref
...
head repository: happo/lcs-image-diff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref
  • 5 commits
  • 6 files changed
  • 1 contributor

Commits on Aug 26, 2024

  1. Handle almost-transparent and transparent pixels better

    I came across a case where one pixel is almost transparent and the other
    is fully transparent. Consider these pixels:
    
    [ 1, 46, 250, 0 ]
    [ 1, 42, 250, 4 ]
    
    With our old logic, there was a color-delta of `1` between these pixels.
    If we blend them both with white, we instead get a very low color-delta
    value.
    
    At first I was going to always blend with white, but I realized we are
    using fully transparent as a signal that there is a gap/missing pixels
    in either the before or after image. So I instead changed it to
    "intentional transparency" where something like
    
    [255, 255, 255, 0]
    [0, 0, 0, 0]
    [100, 100, 100, 0]
    
    would be considered "intentional transparency". Of course, this
    assumption can't always be made. But for us I think we can use it to get
    rid of the edge-case that I present here. There's still a risk that
    we'll encounter "wild" transparency with r===g===b but at least this is
    better than what we have.
    trotzig committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    59a59e5 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Use rgba 1,1,1,1 as "filler" pixel

    Some code we had was assuming that everything fully transparent was
    intentionally added by us as filler for missing content on the right of
    either the before or after image. To make things more explicit, I'm
    using the term "filler pixel" here and setting it to always be 1,1,1,1.
    This way the intentions in the code become clearer and at the same time
    we have less risk of collisions with a transparent pixel that we do not
    control.
    trotzig committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    3e20df5 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Update expected diff snapshot for logo test

    This diff image looks slightly different now that we've made some
    changes to the filler pixel.
    trotzig committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    7d6a88f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #37 from happo/intentional-transparency

    Handle almost-transparent and transparent pixels better
    trotzig authored Sep 4, 2024
    Configuration menu
    Copy the full SHA
    d772300 View commit details
    Browse the repository at this point in the history
  3. 2.3.0

    trotzig committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    5e0d0e5 View commit details
    Browse the repository at this point in the history
Loading