From dff45ef0141d6d2cbe4634dec5ef59cd363a6725 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 22 Oct 2024 18:54:14 -0400 Subject: [PATCH] diff-pdf-page.py: remove intermediate composite step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One convert step can be eliminated, which should help with performance. Change-Id: I860c90fec7f178b456b942d8ad4e4ec5d0412e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175467 Reviewed-by: Justin Luth Tested-by: Jenkins Reviewed-by: László Németh --- bin/diff-pdf-page.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/diff-pdf-page.py b/bin/diff-pdf-page.py index 81bf472d95a7..fced5c84da77 100755 --- a/bin/diff-pdf-page.py +++ b/bin/diff-pdf-page.py @@ -36,9 +36,7 @@ def main(): b_png = tempfile.NamedTemporaryFile(suffix=".png") b_pdf = args.b_pdf + "[" + args.page + "]" run([CONVERT_CMD, "-density", args.density, b_pdf, "-colorspace", "RGB", "-transparent", "white", b_png.name]) - composite_png = tempfile.NamedTemporaryFile(suffix=".png") - run([CONVERT_CMD, a_png.name, b_png.name, "-composite", composite_png.name]) - run([CONVERT_CMD, composite_png.name, "-background", "white", "-flatten", args.diff_png]) + run([CONVERT_CMD, a_png.name, b_png.name, "-composite", "-background", "white", "-flatten", args.diff_png]) if __name__ == "__main__": main()