Skip to content
UniKit

Set image to 300 DPI

Set an image display resolution to 300 DPI: JPEG gets a rewritten JFIF density segment and PNG a rewritten pHYs chunk, with pixel data left completely untouched, plus the real print size at that DPI.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Images are processed locally in your browser with Canvas and never uploaded.

Pick an image first (PNG / JPEG / WebP / GIF all work).

Result

No result yet

Result details

These are the real numbers from this run — copy them straight out.

Pick an image and set the options; sizes, pixel count and export size show up here.

What this tool does

  • A print shop asks for 300 DPI: change the metadata on a camera or screenshot export and the pixel dimensions stay exactly the same.
  • Normalise the DPI of a set of images before submitting or printing, so layout software stops computing different physical sizes.
  • Check what an image currently claims: the result panel shows the value read from the file, or states plainly that none is set.

Example

Input

A 4×4 PNG with no pHYs chunk

Output

A pHYs chunk is written (11811 pixels/metre ≈ 300 DPI); IHDR and IEND are untouched and pixel data is unchanged

Numbers come from setDpi: dpiToPixelsPerMeter(300) = round(300 × 39.3701) = 11811, and reading it back gives pixelsPerMeterToDpi(11811) ≈ 300.

Frequently asked questions

Does changing DPI change the pixel dimensions?

No. DPI is metadata describing how many pixels go into one printed inch; changing it neither resamples nor rescales, so a 3000 × 2400 image stays 3000 × 2400.

Why does the print size change then?

Because print size is pixel count divided by DPI. The same 3000-pixel-wide image is 105.8 cm at 72 DPI and 25.4 cm at 300 DPI — what changes is how many pixels fit in an inch, not the pixels.

Can it handle WebP or GIF?

No, it raises unsupported-format. WebP stores DPI in RIFF extension chunks and GIF only has a pixel aspect ratio; writing to them would corrupt the file, so the tool refuses instead of pretending.

Does it re-compress the image?

No. Only segments or chunks are inserted or replaced; the image data is copied verbatim, so quality is untouched and the file size changes by a few dozen bytes at most.

Keywords:300 dpi imagechange dpiprint resolutionset dpiimage dpi

Related tools