用java代码获取图片实际的长和宽(单位为毫米),不是获取当前图片长和宽的像素个数
伊谢尔伦
伊谢尔伦 2017-04-17 16:11:29
0
2
429
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
PHPzhong

The DPI of the picture is used as a reference for the printer, so that the printed picture can match the actual size when scanning or designing.

In a broad sense, a display screen is also a printer, and its DPI accuracy is usually 72, which is 72 pixels per inch. This is the DPI under the standard resolution of the monitor. If the screen resolution is adjusted, the DPI will also Follow the changes.

Peter_Zhu

1. The actual display size of the same picture is different on monitors of different sizes and resolutions
2. Scaling the picture will also change the size

If you don’t care about the above two points, here are some ideas when there is no DPI data. First, you must find a way to get the physical size (mm) and screen resolution (pixels) of the display, and then get the image size (pixels). There are these three The final result can be calculated using the data

In addition, DPI (Dots Per Inch) refers to the number of dots per inch. Using the DPI picture width and height pixels and screen PPI (pixels per inch, that is, resolution), you can calculate the size of the picture on the monitor

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template