2009. január 3.

ImageMagick converting multiple files

*I do not use this method anymore, although it was a great start.*

After being a book-worm for half a day, I found out how can I write a working script to solve my imagemagick output problem.
It looks like this:


for i in `find -iname '*.jpg'`
convert $i -background white -flatten -colorspace Gray -negate -edge 1 -negate -normalize -sharpen 1 -threshold 50% -despeckle -blur 0x.5 -normalize +dither -posterize 8 gif:- >> $i.gif
1.) open your favorite text editor
2.) copy paste the script
3.) save as anyname.sh
4.) make it executable

1.) copy anyname.sh in the folder containing only the image files you want to make simple
2.) go (cd) to this folder in the terminal
3.) type ./anyname.sh
4.) wait and see.

How to convert this to pdf?

mogrify -format pdf *.JPG

How to join these single-page pdfs?

pdfjoin *.pdf --outfile newname.pdf

Nincsenek megjegyzések: