2004.08.24 08:43 "[Tiff] Insetring text", by Ionita Alexandru

2004.08.24 18:04 "Re: [Tiff] Insetring text", by Bob Friesenhahn

How can I access all pages of a multi-page tiff using imageMagick or graphicsMagick, to append to all of this, page numers, and how can I find out the number of pages in a multi-page tiff?

This list is not really the right place to ask ImageMagick or GraphicsMagick questions.

ImageMagick/GraphicsMagick read the entire TIFF and present it to the C API user as a linked list of Image structures (other language APIs present differently). Each element of the list represents one page. By traversing the list once you can count the number of frames. There is also a GetImageListLength() function which reports the number of frames in the list.

I must annotate this files with page numbers in format 1/n, 2/n, 3/n.... n/n, where n is the total number of pages.

Which means that you would need to traverse the Image list, annotating each image frame, and then write the entire list to a TIFF file.

It may even be possible to do this from the command line.

As Joris mentions, this is much higher level than libtiff, particularly since all frames will be read before anything else can be done (may be prohibitive).


Bob Friesenhahn