Skip to content

Instantly share code, notes, and snippets.

@andyrbell
andyrbell / scanner.sh
Last active July 9, 2024 16:43
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
#!/bin/bash
#
# Usage:
# PADDING=10 HTML_NORMAL=normal.html HTML_HOVER=hover.html ./webkit_sprite
#
if [ -z "$PADDING" ]
then
echo "You need to specify PADDING"
exit -1
fi