displaycal-py3 icon indicating copy to clipboard operation
displaycal-py3 copied to clipboard

Get rid of ``RealDisplaySizeMM`` C-Extension

Open eoyilmaz opened this issue 4 years ago • 3 comments

The RealDisplaySizeMM C-Extension seems to be doing something that can be done using pure Python. Though, this needs further investigation.

Also, this ticket is related to #6, if this ticket is solved, there is no need to solve #6 .

eoyilmaz avatar Feb 20 '22 10:02 eoyilmaz

Under Linux systems, xrandr --verbose gives all the info we need, including EDID which needs to be decoded:

import codecs
edid = codecs.decode(xrandr_edid_data, "hex")

I have no experience with Wayland though, so I don't know if xrandr behaves the same.

eoyilmaz avatar Mar 19 '22 22:03 eoyilmaz

I think the main reason for using the C-Extension at the time was getting the proper display dimensions under macos, maybe that is obsolete now. Heres the story how RealDisplaySizeMM found its way into DisplayCAL: https://www.python-forum.de/viewtopic.php?f=19&t=15859

p5k369 avatar Apr 03 '22 15:04 p5k369

Thanks for the link. It was delighting to read. Though, it is really not enough motivation to use a C-Extension as far as I'm concerned. We should definitely remove it.

eoyilmaz avatar Apr 03 '22 15:04 eoyilmaz