[Gimp-user] convert tiff image to bitonal

Andrew ald2 at arrakis.es
Wed Jan 16 23:58:13 PST 2008


Owen wrote:
>> Imagemagick does the job.
>>
>> Command I used was this:
>>
>> convert -colors 2 -density 600x600 -colorspace gray -compress group4
>> pg_0015.pdf pg_0015.tif
>>
>> The tif files generated are bitonal and the djvulibre bitonal
>> algorithm cjb2 works fine on them.
>>
>> Was not able to batch, so I used openoffice spreadsheet to generate a
>> script containing 774 lines for the 774 images I had to convert. :-)
>>     
>
>
> You could run a bash script something like this
>
> WARNING - UNTESTED
>
> for i in *.tiff; do echo "converting \"$i\"..."; convert "$i" -colors 2
> -density 600x600 -colorspace gray -compress group4 "bitonal-$i"; done
>
>
>
>
> Owen
>
> _______________________________________________
>   
Wouldn't mogrify work?

mogrify -colors 2 -density 600x600 -colorspace gray -compress group4 -format tif *.pdf


Andrew


More information about the Gimp-user mailing list