Urgent.News

What's breaking now, across thousands of outlets.

Tech

What's actually inside an image's DPI tag (and why changing it is lossless)

A print shop rejected a 4000 × 2667 px photo last week because the file "was only 72 DPI". The photo had more than enough pixels for the 8 × 10 in print they were making — at 300 DPI that size only needs 2400 × 3000. Nothing about the image was wrong. One integer in the file header was. This post is about where that integer lives, byte by byte, and why rewriting it doesn't touch a single pixel.…

The DPI tag in an image file is a piece of metadata that indicates the printer's suggested density, not the actual resolution or pixel dimensions. This tag can be found in different formats, such as JPEG, PNG and TIFF, and it lives in a header segment or chunk. When you change the DPI value in the tag, it doesn't affect the actual pixels or compressed data in the image.

The only impact is on how the image is interpreted when it's printed. For example, a file with a 72 DPI tag can be printed at 8 x 10 inches, while the same file with a 300 DPI tag can be printed at 10 x 13.33 inches. The pixels remain the same, and the image's sharpness is unaffected as long as the physical size is what the tag suggests.

The confusion often arises because most image editing software doesn't just change the tag, but also resizes and resamples the image, which can lead to a loss in quality.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Rust for Rust, JS for JS: introducing Ahoi

Why I built Ahoi When you want to manage data state in Rust/Wasm inside a web app, there have been two main options. Option 1: hand-roll the bridge between Rust and JS.

  • Ahoi tool manages data state in Rust/Wasm for web apps
  • Separates reactive state management in Rust, thin bridge to JS
  • Supports SolidJS, React, Vue, Svelte frameworks via npm packages

How a University Student Built a 64+ Client-Side Utility Suite in 30 Days (React, WASM & AI)

Building ToolVerve: A 100% Client-Side Web Utility Suite Hi DEV Community! 👋 I'm a university student, and over the past 30 days, I dedicated my personal effort and focus to build ToolVerve —a…

  • University student builds 64+ client-side utility suite in 30 days
  • Utilizes WebAssembly, Web Workers, PWA, React, Vite, and Tailwind CSS
  • Launches on Product Hunt Sept 7 at 12:01 PM PKT

Building a game server tracker: what I learned exposing a public JSON API

A few months ago I shipped L2 Calendar , a tracker for Lineage 2 private server openings. Players kept asking the same thing: "when's the next Interlude server?" and server owners had no good place to…

  • L2 Calendar simplifies server openings and events for players and owners
  • Date handling challenge: DATE columns became JavaScript Date objects
  • Normalizing dates at data boundary prevents TypeError issues

The Fixpoint No Test Suite Can Check

Code: Megapixel99/lambda-language lm is a small low-level language with four independent backends: C, WebAssembly, ARM64, and bytecode for a VM.

  • Fixpoint test suite checks compiler consistency across backends
  • LM compiler fails to compile itself correctly, passing tests with wrong results
  • Test reveals language limitations like arena and address storage bug

More from Sunday 6 September →