Skip to content

Commit 511ee3d

Browse files
committed
Adding illustration images
1 parent 49a097e commit 511ee3d

10 files changed

+20
-0
lines changed

figures/illustration/build.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
fn=mgt-terminal-illustration.odg
4+
namestring=`echo $fn | cut -d'.' -f1`;
5+
echo $namestring
6+
7+
# This trick is used to export the LibreOffice document as PDF
8+
libreoffice --headless --convert-to pdf $fn
9+
10+
# Since the exported PDF has a lot of whitespace, we remove that before proceeding
11+
pdfcrop ${namestring}.pdf
12+
13+
# Then we move on to convert to lower-resolution JPEG files.
14+
# If you have issues with the permissions on Ubuntu, here is a way to solve it:
15+
# https://askubuntu.com/questions/1181762/imagemagickconvert-im6-q16-no-images-defined
16+
17+
convert -density 300 -quality 90 ${namestring}-crop.pdf ${namestring}_full.jpg
18+
convert -density 300 -resize 1024x1024 -quality 90 ${namestring}-crop.pdf ${namestring}_1024.jpg
19+
convert -density 300 -resize 640x640 -quality 90 -unsharp 0x0.75+0.75+0.008 ${namestring}-crop.pdf ${namestring}_640.jpg
20+
convert -density 300 -resize 320x320 -quality 90 -unsharp 0x0.75+0.75+0.008 ${namestring}-crop.pdf ${namestring}_320.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)