This is not a question, but an attempt to improve my understanding of how DPI is stored in various file formats, and discuss why it works.
I work a lot with images (JPG, PNG and Tiff) and detect their resolution.
For example, I can run this on an image in Imagick:
$imagick = new Imagick($filename); $data = $imagick->identifyimage(); var_dump($data);
It will give me the resolution and units (PixelsPerCentimeter or PixelsPerInch)
In Windows (11), I can only see the resolution in the properties of the JPG but not the PNG, whether you set the PSD to PixelsPerCentimeter or PixelsPerInch, it shows up as ( 300 dpi).
In Imagick (version: ImageMagick 6.9.11-60 Q16 x86_64) - it is able to see the difference between a JPG saved with PixelsPerCentimeter and a JPG saved with PixelsPerInch. But for PNG, no matter how I create/save it in Photoshop, it gives PixelsPerCentimeter.
Photoshop (24.1.0) can also detect PixelsPerCentimeter on JPGs - but the PNGs all "say" they are PixelsPerInch, even if I save them as PixelsPerCentimeter.
Now I totally understand 118.11 PixelsPerCentimeter = 300 PixelsPerInch but I'm really interested in why Windows/Photoshop and Imagick treat them like this?
I did consider that creating the file in Photoshop initially might have side effects, so I created a file using Imagick (PNG, 300dpi, PixelsPerInch), but Imagick specified it as 118 PixelsPerCentimeter.
So I guess my question is: Do these differences depend on how the file is read or the actual metadata stored in the file type?
卡宾男装属于什么档次 | 梦见死人是什么兆头 | 霜花店讲了什么故事 | 与什么隔什么 | 地方是什么意思 |
手淫过度有什么危害 | 鳞状上皮炎症反应性改变是什么意思 | 小孩铅过高有什么症状 | 耳朵流血是什么原因 | 月球上有什么 |
白龙马是什么生肖 | 股藓要用什么药膏效果最好 | 单数是什么 | 什么是编外人员 | 黄精泡酒有什么功效 |
理工男是什么意思啊 | vodka是什么酒 | 内裤发黄是什么原因 | 肝火旺吃什么好 | 吃月饼是什么节日 |
什么牌子的氨基酸洗面奶好hcv9jop0ns5r.cn | 萎缩性胃炎吃什么药好jasonfriends.com | fs是什么单位hcv8jop8ns3r.cn | 蒸鱼豉油是什么hcv9jop3ns2r.cn | 睡觉掉床下是什么预兆hcv7jop9ns0r.cn |
黄帝姓什么shenchushe.com | 肮脏是什么意思hcv9jop0ns9r.cn | 孕妇吃山竹对胎儿有什么好处hcv9jop0ns7r.cn | 信徒什么意思hcv8jop2ns9r.cn | 脱力是什么意思hcv9jop7ns0r.cn |
血白细胞高是什么原因hcv8jop1ns7r.cn | 增强记忆力吃什么qingzhougame.com | 项羽的老婆叫什么hcv7jop6ns7r.cn | 甲泼尼龙是什么药hcv8jop0ns0r.cn | 荨麻疹涂什么药膏hcv8jop2ns2r.cn |
眼睛干涩发痒用什么药hcv7jop9ns3r.cn | 下午2点是什么时辰hcv9jop3ns5r.cn | 长结节是什么原因造成的hcv7jop6ns1r.cn | icu什么意思hcv9jop6ns8r.cn | 如来佛祖叫什么名字hcv8jop9ns8r.cn |
This is not an authoritative, complete answer - more like a "hint" since no one answered you.
This is a bit like a minefield, different software has different lengths. If you want to explore it further,
exiftool
and its-v
option are usually the most helpful.About PNG images
The original PNG specification has a
pHYs
block that only gives horizontal and vertical resolution in meters, inches are not available. HereThe various PNG tags are described.Some software (ImageMagick and
exiftool
) store (JPEG-style) APP1 data (see below) informally inzTXt
blocks. Some don't.In July 2017, the PNG specification was updated to allow
eXIf
blocks. See here.About JPEG images
In JPEG, x/y resolution may be stored in the APP0, APP1, or APP13 (Photoshop) segments. The best description I know is here.
I've never been that interested in XMP data, but I believe x/y resolution might be stored there as well.