Go Back  PPRuNe Forums > Misc. Forums > Computer/Internet Issues & Troubleshooting
Reload this Page >

Forcing a graphic/photograph to display at an exact size.

Wikiposts
Search

Notices
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Forcing a graphic/photograph to display at an exact size.

Thread Tools
 
Search this Thread
 
Old 14th September 2010 | 19:22
  #1 (permalink)  
Thread Starter
Psychophysiological entity
20 Anniversary
 
Joined: Jun 2001
Aviation Qualifications: ATPL
Posts: 3,383
Likes: 169
From: Walton on the Naze Essex.
Forcing a graphic/photograph to display at an exact size.

My professor son, who is fairly clued up about computers, was wondering if it is possible to put a picture on any subject's monitor- no matter its size - and have the picture forced to be the correct size in the real world.

i.e. a twelve inch ruler would be twelve inches long on any screen.

We all feel it's impossible, but if there were some app or method, it would help carry out the research project considerably.

LR
Loose rivets is online now  
Reply
Old 14th September 2010 | 20:05
  #2 (permalink)  
 
Joined: Aug 2002
Posts: 3,663
Likes: 0
From: Earth
LR,

If there was, someone would be very, very rich.....

For a start lots of web designers would like to be able to create guaranteed pixel perfect layout

Unfortunatley in the internet world there's no way to know what monitor and resolution people are using. If you can get software installed then you'll at least be some way towards solving those two, of course.

There is also the issue of lack of resolution when scaling up
mixture is offline  
Reply
Old 14th September 2010 | 20:42
  #3 (permalink)  
bnt
15 Anniversary
 
Joined: Feb 2007
Posts: 755
Likes: 26
From: Dublin, Ireland. (No, I just live here.)
Things are better then they used to be, but not quite there yet. The OS needs to know the DPI (dots per inch) of the monitor. Modern monitor hardware has something called EDID, which reports the hardware details to the OS, including the display size in cm. But ... some EDIDs lie, or the OS ignores it.

Have a look at what this site does with JavaScript: Display DPI detector - find out DPI of your monitor

The code is there to see, and the following lines query the OS for its figures:
Code:
<script type='text/javascript'>  dpi_x = document.getElementById('testdiv').offsetWidth; dpi_y = document.getElementById('testdiv').offsetHeight;
</script>
You could use these figures to scale graphics accordingly. However, this is nevertheless what the OS reports, and may not reflect reality. It tells me that this netbook has a 96x96 DPI resolution, while a few seconds with a ruler and a calculator tell me that it's more like 120 DPI. The EDID in my case has the correct physical dimensions (220mm x 129mm = 10" diagonal) - so Ubuntu should have picked this up, but it didn't - or chose not to.

In my case I can now set the OS (Ubuntu Linux) to display at 120 DPI, but not everyone knows there's even a problem ...

Last edited by bnt; 14th September 2010 at 21:01.
bnt is offline  
Reply
Old 14th September 2010 | 22:49
  #4 (permalink)  
 
Joined: Jan 2006
Posts: 130
Likes: 0
From: UK
Hi LR

I think previous posters may have missed the point. Apologies in advance if I'm barking mad. The problem is not how to scale correctly but how to know the size of the object. Without some external reference to the object, it's absolutely impossible.

Imagine I take a photo of my 12 inch ruler on a plain background and then display it. It is possible for the computer to understand that the object is a 12 inch ruler (although anything other than simple shapes is still tough for a computer, especially if it's never seen one before!). Now imagine I take that ruler, cut 2 inches off the end and then mark it with identical markings except that they are now 0.83r times the size they were originally. Take the same photo, with a plain background, and display it. The computer will (wrongly) display it as 12 inches.

Or perhaps 3 identical Russian dolls? Again, without external reference, which one is which? Impossible to say with a photo of a doll against a plain background.

See the problem? Without some external reference, or some input of extra data, it is an impossible problem to solve. The only solution would be for the computer to take the photo so that it knows exactly what size the object is by providing it's own reference.

Now think about photos of mountains or beaches or anything that's fractal in nature!

BTW, (almost) completely unrelated. I stumbled across an amazing fact the other day when doing some reading on fractals. When measured on the same relative scale, the surface of the earth is smoother than the surface of a table tennis ball!
Simonta is offline  
Reply
Old 15th September 2010 | 02:40
  #5 (permalink)  
Thread Starter
Psychophysiological entity
20 Anniversary
 
Joined: Jun 2001
Aviation Qualifications: ATPL
Posts: 3,383
Likes: 169
From: Walton on the Naze Essex.
Especially one that's been used near my son's three dogs.


Thanks everyone for the input. My son has been informed and can access the posts direct.

Truly amazing what modern technology can reveal about what goes on in the head-bone - if one can gather enough information.
Loose rivets is online now  
Reply

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.