#!/bin/bash
#pbmtext -nomargins < ./clncombined/1966-01_or_02-xx-Unknown_venue_and_date-pre_recording_1966-02-24.txt | pnmtojpeg > test1.jpgP
# convert text -> png
# usage:  text2png.sh  <file.txt>

i="$1"
echo "------------ converting $i to PNG ----------------";
o="`basename $i .txt`"
#a="$o".pnm
b="$o".png
echo "[ writing output to $a ] "

#cmd="ddjvu -format=pnm -quality=85 -verbose $i $a"
#$cmd

#pbmtext -nomargins < $i | pnmtopng > $b
pbmtext -builtin fixed -nomargins < $i | pnmtopng > $b
