Skip to content

Commit

Permalink
fix(screenshot): recognise clip options
Browse files Browse the repository at this point in the history
fixes #5208
STENCIL-1093
  • Loading branch information
christian-bromann committed Jan 9, 2024
1 parent af6e45b commit c15f4c1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/screenshot/screenshot-compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,11 @@ export async function compareScreenshot(
// compare the two images pixel by pixel to
// figure out a mismatch value

// figure out the actual width and height of the screenshot
const naturalWidth = Math.round(emulateConfig.viewport.width * emulateConfig.viewport.deviceScaleFactor);
const naturalHeight = Math.round(emulateConfig.viewport.height * emulateConfig.viewport.deviceScaleFactor);

const pixelMatchInput: d.PixelMatchInput = {
imageAPath: join(screenshotBuildData.imagesDir, screenshot.diff.imageA),
imageBPath: join(screenshotBuildData.imagesDir, screenshot.diff.imageB),
width: naturalWidth,
height: naturalHeight,
width,
height,
pixelmatchThreshold: pixelmatchThreshold,
};

Expand Down

0 comments on commit c15f4c1

Please sign in to comment.