Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Tk screen and monitor size in mm, DPI and scaling -- Parse::EDID

by vr (Curate)
on Mar 15, 2021 at 00:07 UTC ( #11129632=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tk screen and monitor size in mm, DPI and scaling -- Parse::EDID
in thread Tk screen and monitor size in mm, DPI and scaling

I think parse_edid expects raw binary, and

my $raw_edid = pack 'H*', $registry;

will work. There's also check_parsed_edid to alert you, even when (very) suspicious results failed to do so :).

Looking at output, fractional dimensions, in mm, indicate something more involved than simply reading size in whole cm (bytes 21-22), I didn't investigate more closely. Further, I didn't investigate neither (sorry), if, after MainWindow-> scaling(X), anywhere where number for size (meaning 'pixels') is to be used, string such as "N.nm" (N.n mm) would result in identical rendering on screen (let's assume no rounding). That's the whole point of it all, to forget about 'pixels', if I'm reading what you say "re-calculate the size in mm" correctly. I agree, I'd probably won't follow this route, neither (not until all displays are 250 dpi or more).

Replies are listed 'Best First'.
Re^4: Tk screen and monitor size in mm, DPI and scaling -- Parse::EDID -- solution
by Discipulus (Abbot) on Mar 15, 2021 at 07:45 UTC
    Hello vr,

    > There's also check_parsed_edid to alert you, even when (very) suspicious results failed to do so :)

    ah ah ah.. so I was looking shadows on the wall of the cavern supposing them to be real things :)

    Adding print check_parsed_edid( $edid ); only prints for my bad edid_version but I already noticed in my previous output year => 2039 and I had to suspect something wrong.

    Anyway with you packed string (thanks again!) it seems I have meaningful results. I add it here for the posterity (hiding the serial number, just in case..), when we'll have 250 dpi monitors.

    Notably now I read:

    'max_size_horizontal' => '47.7', 'max_size_vertical' => '26.8',

    and these are the physical measures of my monitor!

    Even if I will remove mm calculation from my code, what is better than learn yet another unuseful thing? :)

    Thanks for the support

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-09-23 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?