ImageEn, unit imageenview

TImageEnView.LoadSelectionFromStream

TImageEnView.LoadSelectionFromStream


Declaration

function LoadSelectionFromStream(Stream: TStream; Options: TIERSOptions = iersMoveToAdapt): boolean;


Description

Loads a selection from a stream (saved using SaveSelectionToStream or SaveSelectionToFile). Returns False if it fails.
Options specifies how the selection is adapted when it is applied to an image of a different size or position.

Note: To share the same selection among layers you must use iersSyncLayers.


Example

ImageEnView1.Select(10, 10, 100, 100);
ImageEnView1.SaveSelectionToStream(sel1);
..
sel1.Position := 0;
ImageEnView1.LoadSelectionFromStream(sel1); // this equates to Select(10, 10, 100, 100)