Problem is DPI is Dots Per Inch, not Pixels Per Inch. DOTS represent an amount of ink, not an amount of pixels AFAIK. I do imagine that there exists a linear or otherwise simple function that maps the DPI of any printer to PPI, but I don't think it is universal. Figuring out this relation involves inaccurate hand measurements and trial and error. It's not *that* bad however, and I'll probably end up having to do just that.
But, if a nicer solution exists, I'd be happy. On Tue, Mar 4, 2008 at 4:01 PM, Rob Sherwood <[EMAIL PROTECTED]> wrote: > On Tue, Mar 04, 2008 at 03:50:30PM -0500, Christopher Conroy wrote: > > Hey guys. This is a bit of an off the wall question, and my google-fu > hasn't > > really produced any answers to my liking. > > > > I would like to be able to calculate what size of an image to produce in > > order to print to a target size. Specifically, I'm going to be working > on > > some CAD like stuff which requires a fair amount of computation. Thus, I > > need to do all the computational geometry outside of any program that > > supports such a feature (e.g. AutoCAD). I haven't started coding any of > > this, though I will probably use Ruby or Java if that makes a > difference. > > Either way, I'll be creating images from the calculations. > > > > So, really this is just a matter of figuring out the best way to map > image > > resolution in pixels to print dimensions in inches. > > > > Anyone know of an easy way to do this aside from trial and error > testing? > > I'd like to be as exact as possible, and ideally not have to do any > image > > scaling at print time. (Ideally, the solution will work across multiple > > printers. Bonus points for anything OS agnostic.) > > Sounds like you need to know the dots per inch (DPI) of what your > printing technique is. A lot of printers use 300 DPI, so if you want a > 12" image, use 12*300 == 3600 pixels. Maybe you're asking something more > complicated and I'm not understanding, but... > > - Rob > . > -- Christopher Conroy
