Alex Rivera | Logout

How to get screen DPI (linux,mac) programatically?

Asked 2010-04-12T10:55:28.210
10

I need to know active screen DPI on Linux and Mac OS. I think on linux xlib might be useful, but I can't find a way how to get currect DPI. I want this information to get real screen size in inches.

Thanks in advance!

Edit
Report

1 Answer

9

On a mac, use CGDisplayScreenSize to get the screen size in millimeters.

answered 2011-06-17T20:55:02.287

Your Answer