diff-pdf-page.py: remove intermediate composite step
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 <jluth@mail.com> Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
parent
9254ed4a8b
commit
dff45ef014
1 changed files with 1 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue