ImageEn, unit ievect




procedure LoadObjectsFromTIFF(const fileName: string; pageIndex: integer);


This method loads objects from the specified TIFF. This is like LoadFromFileIEV, but gets the objects info from a tag of the TIFF file.
This method is not compatible with Wang Imaging (you must use another method to save as Wang Imaging), but allows you to save all TImageEnVect objects.
pageIndex specifies the page in a multi-page tiff used to store the objects. In this way you can store a set of objects for each tiff page.

The tag used by default is 40101. However you can change it rewriting the value in ObjectsTIFFTag public variable (defined in imageenio unit). Example:
IEGlobalSettings().ObjectsTIFFTag := 49001;

To save objects use SaveObjectsToTIFF.


// saves the background image
// saves the objects
ImageEnVect1.SaveObjectsToTIFF('output.tif', 0);

// loads the background image
// loads the objects
ImageEnVect1.LoadObjectsFromTIFF('output.tif', 0);

Transition Information

If you are transitioning your code to TImageEnView Layers, instead of LoadObjectsFromTIFF, use: TImageEnVect.CopyAllObjectsTo.
To import existing objects you would need to create a temorary TImageEnVect, load the objects and then copy them to your TImageEnView using TImageEnVect.CopyAllObjectsTo().