Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why a ready-made ID photo failed our browser framing check

Treat head centring as a preference: clamp the crop to valid bounds, then test against the rotated image. That fixed our framing bug. A −1.1° rotation left roughly 10 px of blank space at the top corners of a 538 px-wide crop. You can check your own photo against these rules for free in your browser on this page ; the photo is never uploaded (disclosure: I built it). Why did ready-made ID photos…

A bug in the browser's photo framing check was causing ready-made ID photos to fail, even though the head was properly centered. To fix this, the code was modified to clamp the crop to valid bounds and test against the rotated image. This allowed the cropped image to be checked for actual content coverage, rather than just its position within the canvas.

The issue was caused by treating vertical centring as mandatory and treating the canvas boundary as the image boundary. Adjusting the code to consider the image content itself resolved the problem, allowing photos with blank corners to pass the test.

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

Fix: 'Address Already in Use' (Kill Stuck Process on Any Port)

The Error You start your local server (Node, Python, Go, Docker) and get stopped in your tracks: Error: listen EADDRINUSE: address already in use :::3000 (or bind: address already in use :8080 ) Why…

  • "Address already in use" error occurs when a port is occupied by another process.
  • Linux/macOS users can use "npx kill-port" to terminate the stuck process.
  • Windows users can use PowerShell's "Stop-Process" command to fix the issue.

Hacktoberfest Weekend Challenge: Build for a Friend

What I Built 🧠 MindFlare: A Daily Brain Exercise App for My Mother I built MindFlare , a simple daily brain-exercise app for my mother.

  • MindFlare app created for reporter's mother
  • Uses open-source AI for personalized challenges
  • Deployed on Render, code available on GitHub

More from Sunday 4 October →