Skip to content

no diff is displayed if images only differ in their alpha channel #78

@Ilmarinen100

Description

@Ilmarinen100

Is your feature request related to a problem? Please describe.
I spent a while debugging a change in images that I thought contained no change because imageDiff marked them as "both images are identical" but actually they had different alpha channels causing subtle visual bugs in an app.

Describe the solution you'd like
I would like to see differences in the alpha channel highlighted similarly to differences in other image channels.

Describe alternatives you've considered
Potentially, the diff images could be rendered onto a checkerboard pattern before diffing but I think highlighting differences in alpha channel are more obvious.

Additional context

The following two images have different opacities but are otherwise identical (note that both are white on a white default background color)

before.png:
Image
after.png:
Image
⚠️ note that both images are shown completely white, ideally view this page in dark mode

They are displayed with "both images are identical" but if you look closely, the checkerboard is less visible on the right side (before.png)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions