Convert PDF slides to a "sketchy" version
Sometimes, to make your slide decks "fun", you will want to convert them to look like drawing slides.
A simple way to do it is to use imagemagick. The algorithm is super simple:
- Put your pdf in an empty folder and name it slides.pdf
- Convert each slide/page in a jpeg image
- Apply some effect to each image and output it in a sketch_xxxx.jpg file
- Recombine all sketch_*.jpg in a PDF file named sketch.pdf
Here is what it looks like in a bash script:
# /bin/sh
# 1. convert in jpg
echo "Converting PDF in images"
convert -density 300 slides.pdf slide_%04d.jpg
#2. convert jpg in sketchy jpg
echo "Sketifying the images"
for i in slide_*.jpg; do
convert $i -colorspace gray \( +clone -blur 0x2 \) +swap -compose divide -composite -linear-stretch 5%x0% $(echo $i | sed 's/slide/sketch/')
done
# 3. convert back in pdf
echo "Creating sketch.pdf"
convert sketch_*.jpg -quality 100 sketch.pdf
Now make this script executable and run it from the folder you created in step 1. and it will create a sketch.pdf file containing your "sketch" deck!
Here is a very simple example quickly done with LibreOffice:
Have fun folks :)
From the same author:
In the same category: