Re: how does Photoshop know the physical units when it shows image?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tim Roberts (timr_at_probo.com)
Date: 08/22/04


Date: Sat, 21 Aug 2004 20:43:24 -0700


"vipin" <vipin@nospam.com> wrote:
>
>Snippet of Tim's post:-
>
>"I'm not sure what you're trying to say here, but your statement is just not
>true. If my application REALLY cares about physical inches on the screen,
>and that's entirely possible, I can certainly get to within 1% by using the
>measuring technique I described earlier. And by using an MM_ISOTROPIC
>mapping, I can even run my coordinates in real inches."
>
>This above is not right as I had said again and again in other posts.

It IS right, as I have said again and again in other posts.

>Supporting from msdn(Windows font mapping article
>[ms-help://MS.MSDNQTR.2002JAN.1033/dngdi/html/msdn_fontmap.htm]):-
>
>"Most applications use the convention of LOGPIXELSY (available through the
>GetDeviceCaps function), which is an idealized number of pixels per logical
>inch. The alternative is to compute the number of pixels per physical inch
>using VERTSIZE and VERTRES (also available through the GetDeviceCaps
>function). These values do not provide a hardware-specific value either
>(Windows has no knowledge of the physical size of the screen), but they
>may be a better approximation. With printer devices, the values for both
>logical resolution and physical resolution are usually the same. "
>
>If you read the above and as I show from my snippet,
>non-MM_TEXT modes use the (HORZRES/HORZSIZE) and VERTRES/VERTSIZE for
>approximating the physical inch.

SOME applications use HORZRES and HORZSIZE with non-MM_TEXT modes, but that
is most certainly not the ONLY way to use the non-MM_TEXT mapping modes.
The advantage of the MM_ISOTROPIC mapping mode is that my application gets
to define the physical-to-logical pixel ratio to whatever values I want.
The easy way to get that ratio is to use HORZRES/HORZSIZE and
VERTRES/VERTSIZE.

But, as Louis stated quite correctly, if I display a 500-pixel line on the
screen, ask the user to measure that line with a ruler and enter the
measured length of that line, then my app knows the TRUE real-world
physical size of the pixels. I can set the MM_ISOTROPIC mapping to match
that measurement. After I have done that, my app will have the ability to
draw objects on the screen in exact physical sizes.

Look, I am right about this. I don't care what you read in MSDN. This is
possible. If you want me to write an application to prove it, I will do
so.

-- 
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc


Relevant Pages

  • Re: Writing bulletproof code
    ... >> efficiency. ... > And you call yourself a games programmer? ... > setting pixels on the screen. ... Who cares if that Laura is a pixel out? ...
    (comp.programming)
  • Re: I wonder how Dpreview will handle....
    ... Who cares ... ... What matters is only the number of pixels. ... set the dpi accordingly. ... this was a scanned image, ...
    (rec.photo.digital.slr-systems)
  • Re: BBC Parliament now full screen
    ... I don't think anyone around here cares (unless they read and ... Can you see the black bars on that stuff? ... If not, the issue isn't 704 pixels, ... I bet even the 704 pixel channels often contain ...
    (uk.tech.digital-tv)
  • Re: IE box model
    ... cares if a logo is a few pixels further to the left? ... Geoff Berrow 0110001001101100010000000110 ...
    (uk.net.web.authoring)