A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
I wanted to discuss the concept of drawing on the screen without any mathematical inaccuracies.
I wanted to discuss how Photoshop handles drawing inaccuracies.
A user enters or sets up the canvas size in units he/she is familiar with (i.e. mm or inches). A user can also enter decimal values like 604.8mm for the Canvas height. User then selects the DPI eg- 72 DPI.
Now Photoshop on the screen displays/draws it in pixels. So (604.8*72)/25.4 = 1714.3937 pixels.
It seems Photoshop rounds this value and only creates a canvas with height 1714 pixels.
Now say you are laying out images on this canvas and the left, top, width and height of that image on the canvas are also entered by the user in mm. If you are trying to center the image on the canvas, clearly because of rounding of the pixel values, mathematically, the image might not be centered correctly. If we take out a print out, of this canvas, the image on the canvas is not accurately centered mathematically. Or is it? Does Photoshop automatically take care of these inaccuracies? If so, how?
Any help in this matter is highly appreciated.
When you print it out at 300 dots/pixels per inch, you don't notice the half-pixel discrepency.
Tuesday, June 10, 2008
No matter what medium you render to there will always be inaccuracies. You can minimize these artifacts to one degree or another, but you can never eliminate them entirely (though you may be able to reduce them to a level that cannot be detected by casual inspection).
Modern print output devices routinely have resultions in excess of 600 dpi. With this native resolution, and a moderate amount of control over dot size, you can easily produce rendered output in which only expert inspection will be able to detect any abnormalities (artifacts at near-veirtical or near-horizontal lines and curves, scaling artifacts in pixel images, posterization, etc.). The difference of a few fractions of a pixel near the boundries of a printed page are easy to either ignore or fudge over.
Drawing to the screen, however, is an entirely different matter. Since screen resolutions tend to be fairly low (averaging around 100 dpi and not usually more than about 150 dpi) you have a lot less room to cover for your rendering artifacts. You can get a fair amount of help from subpixel rendering and clever sampling techniques are also useful, but, in the end, you simply have to accept that the screen representation of a geometric model is only an approximation, and the printed output will always have some differences.
Donald Knuth's book "Digital Typography" has some good essays on this subject (including a mathematical proof that, when rendering to a pixel matrix, there is no way to get arrows on line ends to ever look correct at certain angles!). He has spent the better part of the last 40 years in an obsessive quest to achieve typography that meets his exacting requirements for mathematical typesetting, which sound like, pretty much, the sort of thing you are interested in.
Tuesday, June 10, 2008
Zoom into your canvas until 1 image pixel >= 1 screenpixel(s)
Wednesday, June 11, 2008
Hey Jeff, thanks for mentioning 'Digital typography', I've ordered it and am currently reading it. Interesting stuff!
Friday, June 20, 2008
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz