ImageEn, unit iexBitmaps



TIEReadImageStream = procedure(Stream: TStream; Bitmap: TIEBitmap; var IOParams: TIOParams; var Progress: TProgressRec; Preview: boolean);


The procedure to load the image in Stream into Bitmap and fill IOParams with metadata.

Use Progress to return progress information (e.g. for 35% progress Progress.val := 35 and Progress.tot := 100) and notify of load failure (Progress.Aborting^ := True).
When Preview is true, ImageEn is only seeking to fill IOParams, not load the image (i.e. you can skip Bitmap as it will be ignored.
You will need to reset the stream position.