Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Apr 2014, 20:49
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Dpicalc - calculates optimal dpi for resolution/size
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 25 Jan 2010, 17:36    Post subject:  Dpicalc - calculates optimal dpi for resolution/size
Subject description: BaCon prog - binary and source
 

Dear Puppians,

There is a little command-line program that calculates optimal DPI settings for a given screen resolution and display size. I took the algorithm from a python source on an Arch Linux forum and used it in a BaCon program, The binary and source are included in the attached archive. I don't really know how accurate the algorithm is, but you can check the source code for that.

To use it, unpack and copy the binary to an executable directory.
Run it as follows:
Quote:
BaCon DPI Calculator - v. 0.1

Usage: dpicalc hres vres size

Where:
hres = horizontal resolution in pixels
vres = vertical resolution in pixels
size = diag. size of screen in inches

Example: dpicalc 1280 1024 19


This will yield:
Quote:
Calculated DPI for screen resolution of 1280x1024 pixels and 19 in. diagonal = 86


Please let me know whether it works for you.

With kind regards,
vovchik
dpi.tar.gz
Description 
gz

 Download 
Filename  dpi.tar.gz 
Filesize  9.37 KB 
Downloaded  451 Time(s) 
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Mon 25 Jan 2010, 20:50    Post subject:  

I tried it and dpicalc works. I do not completely understand if a given screen and resolution provides the number of dots per inch given by Dpicalc.

Igot the following for my two screens:

800 by 480 with 8.9 inch; 104dpi
1360 by 768 with 18.5 inch; 84 dpi

The number of dots per inch is not usually specificed for a monitor. But, does work and thank you for providing the source code.

_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
davesurrey

Joined: 05 Aug 2008
Posts: 1201
Location: UK

PostPosted: Mon 25 Jan 2010, 21:23    Post subject:  

vovchik:
Nice useful app. Many thanks

JustGreg:
I suspect you know that there is a lot of confusion and sloppy terminology about (including in digital photo forums) where folk use dpi and PPI (pixels per inch) interchangeably.

For a monitor this app just does the trig to calculate the pixels/inch.

dpi (dots per inch) for a printer also depends on how many dots a printer needs to make an individual pixel.

Cheers

Last edited by davesurrey on Mon 25 Jan 2010, 21:42; edited 1 time in total
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Mon 25 Jan 2010, 21:26    Post subject:  

Works nicely
_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Tue 26 Jan 2010, 17:12    Post subject:  

Thanks, Davesurrey, for the clarification. I will check with some people in our graphics department at work on how many pixels per inch or picture elements per inch or dots per inch the human eye can resolve. If I get an answer then I will post it. I do know the screen that has the least pixels per inch looks the best.
_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10655
Location: Arizona USA

PostPosted: Tue 26 Jan 2010, 22:23    Post subject:  

I'm interested to see what you come up with. I bet you'll find that anything beyond a few hundred dpi (or ppi) is wasted on the human eye. Smile
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Wed 27 Jan 2010, 14:20    Post subject:  

Yes, Flash this is an interesting answer. I did talk to our senior graphics supervisor. it was a case of a simple question having a not so simple answer. He limited his answer to printed material only, his area.

It depends on the age of the eyes and wether or not the eye is focused on a small spot. If the person is young, they can resolve up to 150 dots per inch. Those will excellent sight (young flighter pilots) may be able to resolve up to 300 dots per inch. Most people do not have the capability to see that fine detail.

The example, he used was the local newspaper, which is printed at 80 dots per inch, (normal industry standard). I did my own experiment. Holding the paper at normal reading distance, it loolk fine. However, when I held it closer and focused on individual letters, I could notice differences. The letters with straight lines (d and f) were the easiest for me to see the tiny bumps and curves where a straight line should be.

My opinion is for most people, 80 to 100 dots per inch is sufficient. Most people would not notice the difference for anything over 100 dots per inch,

This means for most netbooks with 10.1 inch screen at 1024 by 600 (117 dots or pixels per inche) are a bit over kill for the what is needed.

Please note this is my opinion and I reserve the right to be totally wrong on this.

_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
davesurrey

Joined: 05 Aug 2008
Posts: 1201
Location: UK

PostPosted: Wed 27 Jan 2010, 20:16    Post subject:  

Strange, I thought I posted a message in this thread yesterday but it doesn't seem to be here. Oh well...I wanted to say something along the lines that it's very subjective what is accepted as the limit of resolution of the eye. In a similar way as to what is the threshold of hearing.

Print and a TV monitor are of course rather different. Apart from the difference between a subtractive versus an additive process the TV monitor can vary each RGB pixel over a wide range of intensity (8 bits = 256 levels) whereas few printers can vary the intensity of the CMYK ink dot and those that do are very limited, so very small "sub-dots" are needed so the degree of overlap can vary the intensity. A good reason not to mix up ppi with dpi in printers.

And of course the distance most folk hold a book or newspaper is far less than our normal viewing distance to a monitor or TV screen. There again what's an optimum viewing distance to view the works of the Grand Masters??!!

And of course there's also the issue of viewing a moving image versus a still image where the moving image can appear sharp with less resolution.

So, too many variables to give anything but a range of average values but for PC monitors a figure of 75 to 100 ppi is oft quoted. So I'd agree with your estimates.

One last thing, this all works well with CRT displays which can display a range of resolutions but for LCD displays the natural structure of the screen means they have a Natural resolution and anything different needs to be displayed by interpolation, which will degrade the image to a degree depending on how well it is done.

HTH
Dave
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Thu 28 Jan 2010, 21:05    Post subject:
Subject description: I agree
 

It is very subjective. It really depends on the particular person looking at the screen and what object they are focusing on. I thought for sure someone was going to tell me that I got it completely wrong.
_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 04 Feb 2010, 07:41    Post subject:  

Dear Dave and Greg,

I found a nice quote regarding dpi on the ImageMagick site:

Quote:
At 300 dpi you can tell she's wearing a swimsuit.
At 600 dpi you can tell it's wet.
At 1200 dpi you can tell it's painted on.
I suppose at 2400 dpi you can tell if the paint is giving her a rash.

Joshua R. Poulson


With kind regards, Smile
vovchik
Back to top
View user's profile Send private message 
davesurrey

Joined: 05 Aug 2008
Posts: 1201
Location: UK

PostPosted: Thu 04 Feb 2010, 11:10    Post subject:  

Smile
dave
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Thu 04 Feb 2010, 19:54    Post subject:  

vovchilk, that is great 'Wink'
_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0601s ][ Queries: 12 (0.0034s) ][ GZIP on ]