How PNG pHYs Chunks and JPEG JFIF Headers Store Print Resolution
Inspect the binary bytes behind physical pixel density units (pixels per meter vs. pixels per inch) in raster headers.
Primary Browser Tool
Image DPI Changer
Update embedded PNG pHYs and JPEG JFIF print DPI metadata and calculate physical print dimensions.
PNG pHYs vs. JPEG APP0 JFIF Architecture
PNG files never store DPI directly. Instead, the optional 9-byte `pHYs` chunk stores X and Y pixels-per-meter with unit specifier `1` (meter). Because 1 inch equals 0.0254 meters, 300 DPI converts to `Math.round(300 / 0.0254) = 11811` pixels per meter, protected by a 32-bit CRC checksum.
JPEG files store resolution in the `APP0 JFIF` marker (`FF E0`): density unit `1` denotes dots per inch followed by 16-bit big-endian X and Y density values.
Practical Examples
300 DPI Binary Verification
Inspecting an exported RapidPNG file in Metadata Viewer immediately confirms 300 DPI parsed directly from `pHYs` or `JFIF`.
Common Mistakes & Honest Limitations
Mistakes to Avoid
- Editing pHYs bytes in a hex editor without recomputing the PNG chunk CRC-32 checksum, which corrupts the PNG.
Technical Limitations
- HTML5 Canvas exports omit pHYs by default, which is why a dedicated binary injector is required.