SShortSingh.
Back to feed

Canvas JPEG quality slider inflates flat-graphic screenshots; WebP shrinks them instead

0
·5 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Case Studies Show How Hospital AMRs Are Developed End to End, From Requirements to Deployment

This chapter from the AMR Engineering Process and Development Manual examines how hospital autonomous mobile robots are built, from initial concept through real-world operation. It explains that hospitals present uniquely complex conditions, where patients, staff, visitors, and medical equipment share spaces around the clock, demanding integrated work across navigation, safety, cybersecurity, and reliability. Development begins with requirements analysis involving hospital administrators, clinicians, and infection-control specialists, who help identify repetitive transport tasks such as medication, lab sample, and linen delivery. The engineering approach then translates these needs into a modular architecture separating hardware, software, communication, perception, and cloud services, with mechanical and electrical design tailored to narrow corridors, quiet operation, and easy disinfection. The chapter emphasizes that clearly defined interfaces simplify testing, maintenance, and future expansion.

0
ProgrammingDEV Community ·

AMR Engineering Manual Ch.24 Outlines PRD and Architecture Templates for Mobile Robots

Chapter 24 of the AMR Engineering Process and Development Manual focuses on checklists and templates for autonomous mobile robot projects. It argues that a well-structured Product Requirements Document and architecture template help align customers, product managers, and engineers across disciplines. The PRD should begin with a product definition covering purpose, target industries, operating environment, and business value. Requirements are to be documented with identifiers, rationale, priority, verification methods, and acceptance criteria to maintain traceability. The guidance also stresses specifying measurable non-functional targets, such as localization accuracy and battery endurance, rather than vague qualities like 'fast' or 'reliable'.

0
ProgrammingDEV Community ·

STATERA Library publishes AMR project management chapter on multidisciplinary development

Chapter 23 of the STATERA Library's AMR Engineering Process and Development Manual covers project management and documentation for autonomous mobile robots. It explains that AMR projects differ from conventional software or mechanical projects because software, electronics, mechanics, perception, navigation, AI, and safety must advance together in one integrated physical system. The chapter notes that these disciplines influence one another in a loop rather than in sequence, so management should support continuous iteration. It outlines a framework starting from a clear product vision, followed by measurable project objectives with defined acceptance criteria. It also stresses disciplined scope and requirements management to control complexity, schedule uncertainty, and project risk.

0
ProgrammingDEV Community ·

Analysis of 10,102 Google autocomplete suggestions reveals what travelers ask about China

A developer queried Google's free autocomplete endpoint about China travel, collecting about 2,560 requests that produced 10,102 phrases. Filtering for travel relevance with word-boundary matching left 6,938 phrases, which were grouped by token similarity into 5,394 distinct questions. The largest clusters concerned ten-day itineraries and visa-free visits, and most demand fell under logistics such as transport, money, and visas. Few queries addressed hidden gems or photo spots. The author says this data now guides how the site's pages are written.