I've been asked to create an image of 25mm x 11mm, with 300 DPI. I'm far from an expert so I've simply tried to create a new image in GIMP with these specifications.

The program doesn't allow me to use exactly 25mm x 11mm, the values are automatically adjusted (see screenshot).

create new image

I assume this is some constraint based on pixel to mm conversion or something like that.

What exactly causes this constraint and is there no way to create a image with the previously mentioned specifications?

  1. Because you are working with mm units, and the PPI uses imperial units.

  2. Because if you have exact mm you need to have halved pixels, which you can not, so the number is rounded to its nearest pixel count.

Let me do some math for you.

2.5 / 2.54 = 0.984 inch.

0.984 inch x 300 ppi = 295.275 px.

  • That makes sense, thank you for the elaboration. – Dolores The Third Jul 18 '17 at 9:21
  • 2
    The explanation is correct, but the math is horribly wrong. google.com/search?q=25mm+in+inches – Ben Voigt Jul 18 '17 at 13:51
  • 1
    The first conversion is totally wrong. Right one: 25mm = 25/25.4in = 0.984252 in - at 300ppi this gives 295.2756 pixels, which is rounded to 295 pixels, which gives a real size of 295/300=0.98333inches=24.9766 mm – leonbloy Jul 18 '17 at 15:32
  • Ooops. Corrected. – Rafael Jul 18 '17 at 16:01

Not quite an answer, and too big for a comment, but bear in mind that "300ppi" is simply a useful rule of thumb.

There is a thing called the Shannon-Nyquist Sampling Theorem which, at its most basic says you need to sample twice as frequently as the source frequency in order to accurately reproduce the source frequency from the data.

For printing, they use halftone screens which are (were) typically in the range of 100 to 150 line per inch, with 100 being "newspaper quality" and 150 being "fine art book quality." You will quickly notice that 300 is twice 150, and so 300 was considered "the most you will need."

So the 150lpi screen, in metric units is very close to 6 lines per millimeter, which means we want 12 pixels per mm or 120 pixels per centimeter.

So if you routinely work in metric units, then you might as well use 120px/cm as your new "rule of thumb."

If you are not working for print, then just specify exact pixel dimensions always.

  • 300ppi is exactly what it says: 300 pixels per inch. If you resize a 300ppi image to 1x1 inch, it will be 300x300 pixels. – Aziraphale Jul 19 '17 at 7:37
  • @Aziraphale: incorrect. If you have a 300ppi 2-inch image print it 1 inch, it is now 600ppi. – Yorik Jul 19 '17 at 14:30
  • You are right but that doesn't make my statement wrong. You said "300ppi" is a rule of thumb, which is not true. You can accurately calculate ppi, pixels, size. – Aziraphale Jul 19 '17 at 15:15
  • @Aziraphale: again, incorrect. In this question, we have an individual who wants an exact print size, but using 300ppi is resulting in a fractional pixel. Fractional pixels do not exist, since pixels are simply point samples represented by a brightness value and are irreducable. This lead to confusion for the OP. DPI is a derived value that is simply a flag set in metadata: a hint for software. Only pixels are data, and some image formats have no support for dpi, because again, it is a derived value. The universal 300ppi recommendation is a "best fit" for the purpose of 100-150 lpi halftones – Yorik Jul 19 '17 at 17:25
  • Note also that if one were to, say, print an image of a screen door, then the sampling frequency may need to be much higher to avoid aliasing. Again, 300 ppi is a rule of thumb. – Yorik Jul 19 '17 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.