-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample_image_antialiasing.sh
executable file
·28 lines (20 loc) · 1.26 KB
/
sample_image_antialiasing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -e
# Script for generating antialiasing sample image
# Scale up with no antialiasing (preserves image while increasing resolution)
convert antialiasing_1.png -resize 200% +antialias resize_antialiasing_1.png
convert antialiasing_32.png -resize 200% +antialias resize_antialiasing_32.png
# Crop out the corner to get that "enhance" effect for the lower tiles
convert resize_antialiasing_1.png -crop 300x250+0+0 resize_antialiasing_1_crop.png
convert resize_antialiasing_32.png -crop 300x250+0+0 resize_antialiasing_32_crop.png
# Scale up the cropped versions
convert resize_antialiasing_1_crop.png -resize 200% +antialias resize_antialiasing_1_crop2.png
convert resize_antialiasing_32_crop.png -resize 200% +antialias resize_antialiasing_32_crop2.png
# Add labels
composite -background none -pointsize 32 label:"Samples: 1" -geometry +10+10 resize_antialiasing_1.png resize_antialiasing_1_label.png
composite -background none -pointsize 32 label:"Samples: 32" -geometry +10+10 resize_antialiasing_32.png resize_antialiasing_32_label.png
montage -mode concatenate -tile 2x \
resize_antialiasing_1_label.png resize_antialiasing_1_crop2.png \
resize_antialiasing_32_label.png resize_antialiasing_32_crop2.png \
antialiasing.png
rm resize_antialiasing_*.png