ImageGear Professional for Windows ActiveX
Single-Page Files vs. Multi-Page Files

Some image file types can only hold a single image - for example BMP and JPEG files. Other image file types can hold multiple images - for example TIFF and DICOM files. ImageGear refers to the image within a file as a "Page", and so there are single-page files and multi-page files.

The interpretation of the successive images within a multi-page file depends on the file type and the application. For example, when documents are scanned, they are typically stored as multi-page TIFF files, where each image within the file represents a page of the original document. On the other hand, when a CT scan is recorded in a DICOM file, each image represents a "slice" of the three- dimensional subject. ImageGear always refers to each image as a "page", regardless of the actual file type or interpretation.

When your application loads a single-page file, the image is stored in a single IGPage Object. That object can then be used as the basis for image manipulation and/or display. When your application loads a multi-page file, the application can either direct ImageGear to load a single page of the file (into a single IGPage Object), or it can direct ImageGear to load some or all of the pages in the file (into a collection of IGPage Objects contained within an IGDocument Object). The collection of IGPage Objects can then be displayed side-by-side (as would be done for a CT scan or an MRI), or one after the other in the same area (as would be done for a TIFF document or a GIF animation).

ImageGear uses the "long" data type to count pages. Thus, it can handle up to 2,147,483,648 pages in a multi-page file, and the same number of IGPage Objects in an IGDocument Object.

The pages in a multi-page file are always considered to be numbered consecutively, starting at 0. Thus, if a multi-page file has 5 pages in it, then they are considered to be numbered 0, 1, 2, 3, and 4. An IGDocument Object contains a collection of IGPages, each of which is assigned an "index". When IGPages are loaded into an IGDocument Object, their index values start at 0 by default, but you can override that and start the index values at any positive value. Furthermore, once the IGPages are loaded into an IGDocument Object, some of them can be removed. Removing an IGPage Object will leave a "hole" in the index sequence (so, for example, successive IGPage Objects may be index numbers 0, 2, 12, 15). The IGDocument Object provides GetNextPageIndex Method() and GetPreviousPageIndex Method() for stepping through the successive IGPage Object within an IGDocument Object.



©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback