Hi,
I would appreciate any help.
I am reading a TIFF file that has more than one page. But I only have access to the first page, and I need to read information from all them.
Anyone know how could I read the rest of the pages?
Thanks.
Read TIF multi-page
Re: Read TIF multi-page
I know nothing about Magick++ but you could try input.tiff[1]
The pages will start at 0 so the first page will be [0] the second [1] etc.
The pages will start at 0 so the first page will be [0] the second [1] etc.
Re: Read TIF multi-page
Thanks Bonzo.
The solution is reading a list of from a file.
This example extract each page in a PNG file named with their page number.
The solution is reading a list of
Code: Select all
Images
Code: Select all
InitializeMagick(*argv);
list<Image> imageList;
readImages( &imageList, "input.tif" );
int page = 0;
Image image = NULL;
for (list<Image>::iterator i=imageList.begin(); i != imageList.end(); i++){
image = *i;
image.write(to_string(page++) + ".png" );
}