Created
February 1, 2022 00:40
-
-
Save aberezin/6f9e61f21f495c475f209930b2873dfb to your computer and use it in GitHub Desktop.
Create difference images that represent a visual diff of two pptx files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
alias soffice=/Applications/LibreOffice.app/Contents/MacOS/soffice | |
shopt -s expand_aliases | |
soffice --headless --convert-to pdf arch1.pptx | |
soffice --headless --convert-to pdf arch2.pptx | |
convert -density 150 arch1.pdf -quality 80 'output1.jpg' | |
convert -density 150 arch2.pdf -quality 80 'output2.jpg' | |
i=0 | |
for files in output1-*; do | |
compare -compose src output1-$i.jpg output2-$i.jpg diff-$i.jpg | |
echo -n '.' | |
: $((i++)) | |
done | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment