Calculating image size in inches or dpi from pixels using php

前端 未结 2 1332
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-14 07:20

I need to calculate an approximate image size in inches assuming 300dpi.

I have a target image size in mind, and i want to show the user if the image they have uploa

2条回答
  •  梦毁少年i
    2021-01-14 07:58

    DPI = "dots per inch". One dot = one pixel.

    300 pixels in 300 dpi: 1 inch. You can work it out :-)

提交回复
热议问题