Skip to content

"Swipe" feature on PNG diff seems to show differences in partially-transparent pixels #17735

@vchelaru

Description

@vchelaru

The problem

When viewing a change in a PNG file in Github for Desktop and using the Swipe tab, partially-transparent pixels sometimes "stack", resulting in darker opacity on one side of the swipe. This can confuse users as it appears as if portions of the image have changed when they really haven't.

Release version

3.3.5 (x64)

Operating system

Windows 10 Home 22H2 build 19045.3570

Steps to reproduce the behavior

  1. Create a repository
  2. Commit a PNG (included here)
  3. Make a change to a portion of the PNG
  4. Commit the change
  5. View the diff
  6. Select the Swipe tab
  7. Swipe left/right
  8. Look closely at some of the edges of the art

Observe: Portions of the partially-transparent art "stack", increasing opacity even though no changes have been made
Expected: Portions of the PNG which have not changed should not show any differences on the left/right side of the swipe.

UI_Sheet

Log files

No response

Screenshots

It is subtle, but observe the portion of the top part of the gun with the blue coloring. I recommend opening this PNG in a separate browser window, and zooming in.

16_07 52 24

To make it easier to see, I have also created a zoomed-in screenshot of the problem. The dotted line shows where the Swipe boundary is located. Both the top and bottom gun show the problem, but I only included the dotted line across the top gun so that you can see the boundary clearly on the bottom gun (where the arrow points).

image

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugspriority-3Bugs that affect small number of users and/or relatively cosmetic in nature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions