diff --git a/crates/typst-render/src/image.rs b/crates/typst-render/src/image.rs index 3890244ae..ee8ee4822 100644 --- a/crates/typst-render/src/image.rs +++ b/crates/typst-render/src/image.rs @@ -98,7 +98,7 @@ fn scale_image( ImageScaling::Pixelated => FilterType::Nearest, _ => FilterType::Lanczos3, // downscale }; - buf = image.resize(w, h, filter); + buf = image.resize_exact(w, h, filter); &buf }; for ((_, _, src), dest) in resized.pixels().zip(pixmap.pixels_mut()) { diff --git a/tests/ref/baseline-box.png b/tests/ref/baseline-box.png index 2a9e51758..e07e22ea7 100644 Binary files a/tests/ref/baseline-box.png and b/tests/ref/baseline-box.png differ diff --git a/tests/ref/box-clip-outset.png b/tests/ref/box-clip-outset.png index 21538e85f..8ea40e968 100644 Binary files a/tests/ref/box-clip-outset.png and b/tests/ref/box-clip-outset.png differ diff --git a/tests/ref/box-clip-radius-without-stroke.png b/tests/ref/box-clip-radius-without-stroke.png index 121373582..2be772cc5 100644 Binary files a/tests/ref/box-clip-radius-without-stroke.png and b/tests/ref/box-clip-radius-without-stroke.png differ diff --git a/tests/ref/box-clip-radius.png b/tests/ref/box-clip-radius.png index da20fa5bf..530d53309 100644 Binary files a/tests/ref/box-clip-radius.png and b/tests/ref/box-clip-radius.png differ diff --git a/tests/ref/closure-path-resolve-in-layout-phase.png b/tests/ref/closure-path-resolve-in-layout-phase.png index baaed3564..a3d699981 100644 Binary files a/tests/ref/closure-path-resolve-in-layout-phase.png and b/tests/ref/closure-path-resolve-in-layout-phase.png differ diff --git a/tests/ref/coma.png b/tests/ref/coma.png index 2c59ae870..a1d743a49 100644 Binary files a/tests/ref/coma.png and b/tests/ref/coma.png differ diff --git a/tests/ref/footnote-in-caption.png b/tests/ref/footnote-in-caption.png index 12a5fde5e..79b2b5d0f 100644 Binary files a/tests/ref/footnote-in-caption.png and b/tests/ref/footnote-in-caption.png differ diff --git a/tests/ref/footnote-in-table.png b/tests/ref/footnote-in-table.png index 062a6fc71..e110eac6d 100644 Binary files a/tests/ref/footnote-in-table.png and b/tests/ref/footnote-in-table.png differ diff --git a/tests/ref/image-baseline-with-box.png b/tests/ref/image-baseline-with-box.png index dc8e8bc57..ade90e2f5 100644 Binary files a/tests/ref/image-baseline-with-box.png and b/tests/ref/image-baseline-with-box.png differ diff --git a/tests/ref/image-decode-detect-format.png b/tests/ref/image-decode-detect-format.png index 6ecb7dcda..cee71bb93 100644 Binary files a/tests/ref/image-decode-detect-format.png and b/tests/ref/image-decode-detect-format.png differ diff --git a/tests/ref/image-decode-specify-format.png b/tests/ref/image-decode-specify-format.png index 6ecb7dcda..cee71bb93 100644 Binary files a/tests/ref/image-decode-specify-format.png and b/tests/ref/image-decode-specify-format.png differ diff --git a/tests/ref/image-fit.png b/tests/ref/image-fit.png index 24946fdbd..432daf741 100644 Binary files a/tests/ref/image-fit.png and b/tests/ref/image-fit.png differ diff --git a/tests/ref/image-sizing.png b/tests/ref/image-sizing.png index e1201cf22..7cb59fc76 100644 Binary files a/tests/ref/image-sizing.png and b/tests/ref/image-sizing.png differ diff --git a/tests/ref/issue-4361-transparency-leak.png b/tests/ref/issue-4361-transparency-leak.png index 4060d43ac..660798166 100644 Binary files a/tests/ref/issue-4361-transparency-leak.png and b/tests/ref/issue-4361-transparency-leak.png differ diff --git a/tests/ref/pad-followed-by-content.png b/tests/ref/pad-followed-by-content.png index 90b48232a..534a97870 100644 Binary files a/tests/ref/pad-followed-by-content.png and b/tests/ref/pad-followed-by-content.png differ