Skip to content

Difference image doesn't show difference in opacity. #520

@CraigSiemens

Description

@CraigSiemens

If the difference in two images is only the alpha channel but the rgb channels are the same, the difference image won't show that anything has changed.

Example

In this case it's a UILabel that has where the textColor is black (rgba(0, 0, 0, 1)) and the backgroundColor is clear (rgba(0, 0, 0, 0)).

Reference

Failure

Difference

If I take the reference and failure images and pass them to ImageMagick's compare command, it gives the following image showing the differences..

If I change view being snapshot to have a white background, then the created difference image shows the changes. While this does work, adding a background color to the view then means it isn't exactly the same as the view that'll be used in the app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions