I am trying to load the content of a database field into a ImageEnMView but it will only display the first page of a multi-page TIFF.
IEDBMultiBitmap.Mode := dmAllRecords; IEDBMultiBitmap.DataSource := dsFieldReport; IEDBMultiBitmap.ImageBlobField := 'TIFFPages'; //--IEDBMultiBitmap.ParamsEnabled := True; // Attempt to access page 2 //--IEDBMultiBitmap.Params[0].ImageIndex := 2; // Attempt to access page 2 ImageEnMView1.SetExternalMBitmap(IEDBMultiBitmap); ShowMessage('Count='+IntToStr(ImageEnMView1.ImageCount)); // RESULT IS ALWAYS -- Count=1
No matter what I try, I have only been able to view the first page. The same image can be loaded into a TImageEnDBView and all pages can be viewed using this code: with ImageEnDBView1 do begin DataSource := dsFieldReport; DataField := 'TiffPages'; LoadPicture; AutoStretch := True; AutoShrink := True; end;
The database field is an Oracle BFILE which contains a reference to a physical file in the file system. It behaves as if the image is actually in the database. I can load the associated file into the ImageENMView and it works correctly. Users cannot be allowed to directly access the file system so this needs to work through the BFILE.
Is it possible to load all pages into the ImageEnMView1 from the database field?
dmAllRecords, which displays (the first frame of) all images in a database dmRecordFrames, which shows all frames of the image at the current database position