Originally Posted by
helloworld922
In general it's not possible to determine the DPI of a screen because some screens don't have a fixed size, for example projectors. You could try ask the user to input in a display size manually.
Additionally, for a normal viewing distance many displays don't have enough pixel density to be indistinguishable to viewers. An average display may have something like 72-150 DPI, but if viewed from under 2 ft this may not enough for the average viewer to not recognize pixels. Drawing less than 1 image pixel per 1 screen pixel is likely just a waste as you can't resolve details that fine anyways, and the drawing engine will have to do some kind of averaging of image pixels.
Thank you. The scenario I have in mind is a large high-resolution monitor used for a TV and computer screen. Say it can be viewed from 2' to 12'. Pixelation at 2' might disappear at 12'. Currently my OS learns some things about my plug and play monitor when it is installed, such as what driver it needs. Perhaps it also knows (or will some day know) the size of the monitor, and Java code can tell us programmers what it is. In some cases, as you say, the size is variable and would have to be entered. In any case a configurable presentation with maximum/non-pixelation viewing of images for a specified distance from the screen would be beneficial. Until then, I guess I will continue to limit the maximize size of the images to 1 screen pixel/image pixel. Eventually, I would hope to have the information to configure better.