Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Twenty Resize Round Trips Fade a Photo by 8.6 Code Levels — but Only If You Use Bilinear

I resized seven photographs up to 2× and back down to 1× twenty times, using the same kernel for both legs, and then measured how far the mean brightness had moved. With bilinear it had moved +8.60 code values out of 255. With bicubic it had moved +0.076 . With Lanczos it had moved +0.016 . That ordering is the opposite of what I expected, and it is not a rounding curiosity. Over the same twenty…

The study examined how seven photographs were resized and then resized back to their original size 20 times, using three different kernels: bilinear, bicubic, and Lanczos. The order in which the kernels affected the images was surprising and did not align with expectations. Bilinear resizing resulted in a mean brightness moving +8.60 code values out of 255, while bicubic moved +0.076 and Lanczos moved +0.016.

The largest difference was observed at the 20 round trip mark, where bilinear lost 12% of the image's standard deviation, while Lanczos gained 0.66%. The cheapest kernel, bilinear, seemed to wash out the image, while the more expensive Lanczos kernel was stable and slowly drifted in the opposite direction. The results held true across different kernels, data sets, and Pillow library versions, confirming that the observed drift was indeed a result of the kernel meeting the real image content.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

We Ran Our Own Live SPF/DMARC/CSP Grader on Our Prod Domain and Got 37/100 (Grade F) - Fixing It to 100/100 A+ in 15 Mins

Tonight we shipped a passive public domain spoofing & HTTP attack-surface grader ( ExposeShield ) and did the one thing every dev should do before tweeting a launch: we ran it against our own…

  • Production domain scored 37/100 on live SPF/DMARC/CSP grading
  • Identified four security gaps: missing SPF, DMARC, CSP, and security.txt
  • Implemented fixes within 15 minutes, achieving 100/100 A+ grade

More from Friday 27 November →