Created
January 11, 2013 14:47
-
-
Save gipi/4511195 to your computer and use it in GitHub Desktop.
Create #DJVU from #JPEG images
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
#!/bin/bash | |
# http://www.howtoforge.com/creating_djvu_documents_on_linux | |
DPI=300 | |
if [ $# -lt 2 ] | |
then | |
echo "usage: $0 root" | |
exit 1 | |
fi | |
ROOT=$1 | |
SRC=$(ls ${ROOT}*.jpeg) | |
for f in ${SRC} | |
do | |
anytopnm $f | ppmtopgm | pgmtopbm -value 0.499 > $f.pbm | |
cjb2 -dpi $DPI $f.pbm $f.djvu | |
rm $f.pbm | |
done | |
djvm -c $1.djvu $(ls *jpeg.djvu) | |
rm $(ls *jpeg.djvu) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment