Hi,
Im new to image magick and I need to batch process a large number of scanned book *.tif images.
While scanning and converting of the pictures, the conversion software embeded his logo in to these pictures (see below) and I wish to remove this.
http://img543.imageshack.us/img543/381/goldfish.png
Anyone has an Idea how to do this with IM?
Many thanks for help
batch cropping
batch cropping
IM Version: 7:6.5.7.8-1ubuntu1.1
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: batch cropping
You can use convert on one image or mogrify on many images. For example, if all the logos are in the same place at the top as this one, then
convert goldfish.png -gravity north -chop 0x80 goldfish_tmp.png
or for many images, set up two directories, say proc1 and proc2. Put all your images in proc1 and direct mogrify to put the results in proc2
cd proc1
mogrify -path /pathto/proc2 -format tif -gravity north -chop 0x80 *.tif
See the various methods of cropping, shaving, chopping at http://www.imagemagick.org/Usage/crop/
see mogrify at http://www.imagemagick.org/Usage/basics/#mogrify
convert goldfish.png -gravity north -chop 0x80 goldfish_tmp.png
or for many images, set up two directories, say proc1 and proc2. Put all your images in proc1 and direct mogrify to put the results in proc2
cd proc1
mogrify -path /pathto/proc2 -format tif -gravity north -chop 0x80 *.tif
See the various methods of cropping, shaving, chopping at http://www.imagemagick.org/Usage/crop/
see mogrify at http://www.imagemagick.org/Usage/basics/#mogrify
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: batch cropping
Looking at the 'goldfish' document. it looks like the logo is very invasive. It it overlays actual scanned text you will loose that text.
However in the example you gave the logo is well separated from the rest of the image. A simple -chop should remove it.
See http://www.imagemagick.org/Usage/crop/#chop
However in the example you gave the logo is well separated from the rest of the image. A simple -chop should remove it.
See http://www.imagemagick.org/Usage/crop/#chop
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/