From 63c72edc1a50cb4e54dced8d8b231959075fc14d Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sun, 12 Dec 2021 18:15:12 +0100 Subject: Add ImageMagick lore --- guides/imagemagick.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 guides/imagemagick.org (limited to 'guides/imagemagick.org') diff --git a/guides/imagemagick.org b/guides/imagemagick.org new file mode 100644 index 0000000..25859e8 --- /dev/null +++ b/guides/imagemagick.org @@ -0,0 +1,15 @@ +ImageMagick recipes I should stuff into config files or scripts, but +haven't yet. +* Configuration +** Allow conversion from/to PDF +- Open ImageMagick's =policy.xml= configuration file. +- Locate the == tag with a =pattern= including "PDF". +- Comment it out. +* Comparing images +~magick compare~ is a thing; ~magick convert~ can also do [[https://stackoverflow.com/a/33673440][neat stuff]]: +#+begin_src sh +convert '(' a.png -flatten -grayscale Rec709Luminance ')' \ + '(' b.png -flatten -grayscale Rec709Luminance ')' \ + '(' -clone 0-1 -compose darken -composite ')' \ + -channel RGB -combine diff.png +#+end_src -- cgit v1.2.3