AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.08.24 08:43 "[Tiff] Insetring text", by Alexandru, Ionita
2004.08.24 17:50 "Re: [Tiff] Insetring text", by Joris
2004.08.25 17:35 "[Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Joris
2004.08.25 17:57 "Re: [Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Frank Warmerdam
2004.08.26 04:46 "Re: [Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Ross A. Finlayson
2004.08.26 09:27 "Re: [Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Joris
2004.08.26 16:03 "Re: [Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Ross A. Finlayson
2004.08.25 19:08 "RE: [Tiff] Not-a-bug report, TIFFFdOpen (tif_win32) - TIFFClientOpen", by Neufeld Computer Services
2004.08.24 18:04 "Re: [Tiff] Insetring text", by Bob Friesenhahn

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

I have a question.

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
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen