Page 1 of 1
Unable to process image [.tiff] which contains two or multi pages
Posted: 2015-03-05T07:09:59-07:00
by sanjaysurve
Hi,
I am successfully resizing images using imagemagick.
But when i am trying to manipulate or resize image [.tiff format] which contains two or more pages then its not processing properly.
If any one have an idea about the same. Please advice.
Thanks in advance.
Re: Unable to process image [.tiff] which contains two or multi pages
Posted: 2015-03-05T07:20:55-07:00
by snibgo
If your input file has two (or more) images, you will get two (or more) outputs. If your output format is tiff, that will be no problem.
If you want to process just one input from a tiff, use [n] where n is an integer from zero upwards, eg:
Code: Select all
convert in.tiff[2] -resize 200x300 out.png
Re: Unable to process image [.tiff] which contains two or multi pages
Posted: 2015-03-09T00:02:32-07:00
by sanjaysurve
snibgo wrote:If your input file has two (or more) images, you will get two (or more) outputs. If your output format is tiff, that will be no problem.
If you want to process just one input from a tiff, use [n] where n is an integer from zero upwards, eg:
Code: Select all
convert in.tiff[2] -resize 200x300 out.png
Hi snibgo, thanks for quick reply.
Your provided information is helpful for me.
But if I don’t know how many pages/slides contains under [.tiff] image then is it possible to fetch information about same.
For example, suppose user submitted one [.tiff] image which contains more than two or more pages/slides. Then how I will come to know number of pages/slides in image.
Once again thanks.
Re: Unable to process image [.tiff] which contains two or multi pages
Posted: 2015-03-09T00:32:15-07:00
by snibgo
Code: Select all
identify -format %n x1.tiff
11
identify x1.tiff
x1.tiff[0] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.000
x1.tiff[1] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.045
x1.tiff[2] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.045
x1.tiff[3] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[4] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[5] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[6] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[7] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[8] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[9] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[10] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.092
Does that help?
Re: Unable to process image [.tiff] which contains two or multi pages
Posted: 2015-03-09T00:40:53-07:00
by sanjaysurve
snibgo wrote:Code: Select all
identify -format %n x1.tiff
11
identify x1.tiff
x1.tiff[0] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.000
x1.tiff[1] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.045
x1.tiff[2] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.045
x1.tiff[3] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[4] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[5] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.061
x1.tiff[6] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[7] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[8] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[9] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.077
x1.tiff[10] TIFF 4924x7378 4924x7378+0+0 16-bit sRGB 1.1448GB 0.000u 0:00.092
Does that help?
Ok. Yes this will works for me.
Thanks snibgo..