Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Representing DPI in the real world actually requires at least two if not more floating point numbers.

The print/prepress industry has a long history of devices with asymmetric resolution, or higher resolution in monochrome versus color (similar to 4:2:0 pixel format used in digital video).

Considering professional print/prepress machines last 20 or more years in-service you have to handle just about everything.



All true, but irrelevant for images. All the number does is indicate the intended physical dimensions of the image.

For example, an image with pixel dimensions of 1800 by 1200 and a “DPI” metadata value of 300 will print with a physical dimension of 6.00 by 4.00 inches.


You misunderstand: the file format itself needs to have at least horizontal and vertical DPI values to be generally useful.

Many film scanners for instance are say 2400 dpi vertically and then some other DPI value horizontal depending on the film or picture format. Anamorphic lenses are used to scale a wide-aspect image onto a 4:3 sensor.

Some scanners and printers even have different DPI for different color components.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: