[Python] How to display an image in retina resolution from Python

Discussão em 'Python' iniciado por Stack, Fevereiro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I have a simple thing I'd like to do from within a Python script: open a window and display an image, in full resolution on a retina display, on MacOS.

    I can't seem to find a way to do this, so I'm looking for a solution. I don't mind if it's via matplotlib or Tk or anything else. I don't need the script to do anything apart from generate the image and display it until I close the window. The image is stored in a numpy array.

    I've mostly tried poking around with matplotlib, changing the backend and the figure.dpi in the rcparams, but it didn't seem to have any effect. It's difficult to google for solutions because most people are using Jupyter notebooks but I really just want to use a script.

    Continue reading...

Compartilhe esta Página