This is hardly the forum for a thread on dpi, so I will keep it short. DPI is just a measurement of pixels at a given size in inches.
If you use a program to increase (interpolate) an images resolution, you are ADDING pixels. So, a 900 x 900 pixel image is 300dpi at 3 inches, if you interpolate that to 600dpi, you are either shrinking The image to 1.5 inches or you are doubling the amount of pixels in the image. Yes, dpi exists, but my point is that if you have a 750 x 900 pixel image it is 300dpi at 2.52 x 3 inches. -Bill Ensley Bear Printing -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antoine Sent: Friday, May 19, 2006 10:40 AM To: [email protected] Subject: Re: [iText-questions] Tiff scale On 17/05/06, Bill Ensley <[EMAIL PROTECTED]> wrote: > You can't state that you have a tiff of 750 pixels by 900 pixels and > Also say that it is 600dpi. It doesn't work that way. You certainly can. DPI is a mandatory tiff tag, as are height and width (in pixels). > A 750 by 900 pixel image is 600 dpi at 1.26 inches by 1.5 inches. > It is 300 dpi at 2.52 x 3 inches. > > The math is pixels/dpi = inches. or inches * dpi = pixels or more "correctly" pixels/inches = dpi (dots per inch after all!) > > <>I have a Tiff file width: 750 pixels, height: 900 pixels, > > resolution 600 dpi, bit depth 24. How can I scale the image to > > width: 100 pixels, height: 120 pixels, and keep the resolution close to 600 dpi? You could use an image manipulation library, like imagemagick to do a resample - though if you don't care about size then I would suggest just telling the pdf to show the image at 100/120 (I suppose this is possible with iText?)(this won't give you 600dpi but much more...). The point is that what you are talking about is quite a complicated thing to do. You need to get rid of a certain number of pixels, and the ones discarded *do* matter if you care about your image. Best leave that to a programme with that as its core focus (there are many algorithms that do things in different ways...). Cheers Antoine -- This is where I should put some witty comment. ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
