ImageEn, unit ievect

TImageEnVect.SaveObjectsToTIFF

TImageEnVect.SaveObjectsToTIFF


Declaration

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


Description

Saves all objects in the specified TIFF. This is like SaveToFileIEV, but incorporates the objects info in 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 load objects back use LoadObjectsFromTIFF.


Example

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

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


Transition Information

To save layers to the meta data of JPEG or TIFF images instead of SaveObjectsToTIFF, use: TIEImagingAnnot.CopyFromTImageEnView

ImageEnView1.IO.Params.ImagingAnnot.CopyFromTImageEnView();