Skip to content

Transparency or saturation issue with image while adding landmarks on MacOS #2355

Open

Description

@asudler

This issue seems related to #1944.

An issue occurs with rendering/repaint in the landmarks editor on MacOS. When I try to define image landmarks, the image viewport turns white unless I place a landmark. After placing a landmark, the image becomes visible again, but zooming causes the image area to turn white again. This makes accurate landmark placement quite tedious. I use KLayout a lot with SEM images, so I am including a video of the issue when I try working with an arbitrary SEM image from the internet.

klayout_landmarks_editor_issue.mp4

More info:

  • Environment: MacOS Tahoe 25.6
  • Architecture: Apple Silicon M4
  • KLayout version: 0.30.8
  • It has happened to me with .png and .bmp images. In the video example I use a .jpeg image and it still occurs.

Please let me know if there is a debug log, rendering backend setting, or test build I should try.

Activity

  1. klayoutmatthias commented on May 21, 2026

    @klayoutmatthias
    Collaborator

    Thanks for this bug report.

    Is it possible to attach an image that reproduces the problem? Is that a grayscale image?

    Thanks,

    Matthias

  2. asudler commented on May 21, 2026

    @asudler
    Author

    Thank you for the response! I used the following grayscale image to make the example video.

    Image

    But the issue still occurs for color images, see below for example.

    klayout_landmarks_editor_issue_color.mp4
  3. klayoutmatthias commented on May 21, 2026

    @klayoutmatthias
    Collaborator

    Thanks for the image. I'd be interested in exactly the file you are using to be as close a possible to your case. I can't reproduce the problem with an image of my own on Ubuntu.

    Can you maybe .zip your image, so I really have exactly the file you're using?

    I'd also be interested if you are able to reproduce the problem on a Linux or Windows machine. If it's a MacOS-only problem, I can't really help. It might be related to Qt or the graphics driver then.

    Matthias

  4. Kazzz-S commented on May 22, 2026

    @Kazzz-S
    Contributor

    Hello @klayoutmatthias,

    I've done a few experiments in the KLayout's main canvas.
    Unfortunately, this problem appears to be Mac-specific and doesn't reproduce on Windows or Linux.

    Sample Image

    Image

    sample.zip


    Windows 11 (VM on Sequoia) with Qt5.15.11

    01-Qt5_15_11-IntelWin11.mp4

    Linux Mint 22 (VM on Sequoia) with Qt5.15.13

    02-Qt5_15_13-Mint22.mp4

    Sequoia (Intel Mac) with Qt5.15.18

    03-Qt5_15_18-IntelMac.mp4

    Sequoia (Intel Mac) with Qt6.11.1

    04-Qt5_15_18-M4.mp4

    Tahoe (M4 Apple Silicon) with Qt5.15.18

    04-Qt5_15_18-M4.mp4

    Tahoe (M4 Apple Silicon) with Qt6.11.1

    06-Qt6_11_1-M4.mp4

    Kazzz-S

  5. klayoutmatthias commented on May 23, 2026

    @klayoutmatthias
    Collaborator

    Hi @Kazzz-S,

    thanks for the experiments! So I see it's not only the landmark editor. It's also a problem on the layout view and it is independent of the CPU kind.

    There is no graphics driver involved in displaying the image on the layout canvas, so the only explanation I have is a bug that only manifests with the clang compiler.

    Let me see if I can find something by using a memory checker.

    Thanks and best regards,

    Matthias

  6. klayoutmatthias commented on May 24, 2026

    @klayoutmatthias
    Collaborator

    I tried with clang 14 on Linux, but can't see that problem. I also could not find a potential memory corruption issue, when I ran the test in valgrind.

    I will get myself a virtual Mac instance again sooner or later to debug the issue, but I can't promise a timeline.

    Matthias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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