KamoCRM

Read real image dimensions from the bytes

FeatureSecurityService
Shipped
25 ஆகஸ்ட், 2026 அன்று 4:19 PM UTC
Author
Kamo
Commit
f1364ab

Nothing here trusts the page. An HTML width attribute is a layout instruction, not a fact about the file -- a 2400px logo is routinely declared width="180" and a tracking pixel width="600" -- so scoring on the page's numbers ranks a spacer above a real logo. Hand-written rather than ImageIO because ImageIO reads none of the three formats that matter most here: SVG (the best answer for the compact slot), ICO (what /favicon.ico always is) and WebP (what a modern site serves everything as). Two details worth keeping: an ICO is a container and the LARGEST entry is reported, since the first is usually 16x16; and an SVG is measured by viewBox rather than width, which is routinely "100%" and says nothing about the artwork's proportions.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing