mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-07 01:56:04 +00:00
fix(cli): consolidate layout and contrast audit correctness (#2401)
* fix(cli): respect transparent image pixels in occlusion audit * test(cli): cover contained image letterboxing * fix(cli): account for text strokes in contrast checks * fix(cli): honor text overflow opt-outs * fix(cli): skip contrast on transparent backdrops * chore(skills): refresh generated manifest
This commit is contained in:
@@ -510,7 +510,11 @@ async function collectContrast(
|
||||
// This screenshot is the one contrast math is sampled from below — it must
|
||||
// stay untouched by the annotation overlay (finishContrast reads real
|
||||
// painted pixels), so annotation only ever happens on a SECOND shot.
|
||||
const measurementShot = await page.screenshot({ encoding: "base64", type: "png" });
|
||||
const measurementShot = await page.screenshot({
|
||||
encoding: "base64",
|
||||
type: "png",
|
||||
omitBackground: true,
|
||||
});
|
||||
if (typeof measurementShot !== "string") throw new Error("Contrast screenshot was not base64");
|
||||
const raw = await finishContrast(
|
||||
page,
|
||||
|
||||
Reference in New Issue
Block a user