Canvas JPEG quality slider inflates flat-graphic screenshots; WebP shrinks them instead
A developer tested the canvas toBlob quality setting in HeadlessChrome by re-encoding a 1200x630 PNG social card and measuring output sizes. At the default 0.75 JPEG setting, the file grew about 30% larger than the original PNG, and only dropped below it somewhere between 0.60 and 0.40. The problem appears to affect flat-color graphics such as screenshots, icons and logos, while camera photos behave as expected. WebP at the same quality levels produced smaller files than JPEG across the board, and the PNG format ignores the quality argument entirely. The author also found that the canvas PNG encoder produced files 60% larger than the original, and that repeatedly re-encoding a JPEG barely changes its size.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in