crop page in multipage tif
Posted: 2012-02-15T13:23:04-07:00
I am trying to crop a single page of a multipage tif in a single operation.
Source.tif is a 15 page tif file. I want to crop page 2 to 1700 X 1300 @ 250,50.
I can get it to work using 3 separate commmands;
convert Source.tif[1] -crop 1700X1300+250+50 +repage croppedPage.tif
convert Source.tif -delete 1 deletedPage.tif
convert deletedPage.tif croppedPage.tif -insert 1 newSource.tif
Although this works, it is slow on large multipage files. So, I want to do it in one command.
I tried:
convert Source.tif ( -delete 1 ) Source.tif[1] -crop 1700X1300+250+50 +repage -insert 1 newSource.tif
and:
convert Source.tif ( -delete 1 ) Source.tif[1] ( -crop 1700X1300+250+50 +repage ) -insert 1 newSource.tif
but that crops every page.
I tried:
convert Source.tif ( -delete 1 ) ( Source.tif[1] -crop 1700X1300+250+50 +repage ) -insert 1 newSource.tif
but that just moves the last page to the first.
Any ideas?
Gerald
Source.tif is a 15 page tif file. I want to crop page 2 to 1700 X 1300 @ 250,50.
I can get it to work using 3 separate commmands;
convert Source.tif[1] -crop 1700X1300+250+50 +repage croppedPage.tif
convert Source.tif -delete 1 deletedPage.tif
convert deletedPage.tif croppedPage.tif -insert 1 newSource.tif
Although this works, it is slow on large multipage files. So, I want to do it in one command.
I tried:
convert Source.tif ( -delete 1 ) Source.tif[1] -crop 1700X1300+250+50 +repage -insert 1 newSource.tif
and:
convert Source.tif ( -delete 1 ) Source.tif[1] ( -crop 1700X1300+250+50 +repage ) -insert 1 newSource.tif
but that crops every page.
I tried:
convert Source.tif ( -delete 1 ) ( Source.tif[1] -crop 1700X1300+250+50 +repage ) -insert 1 newSource.tif
but that just moves the last page to the first.
Any ideas?
Gerald