ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIEDBMultiBitmap and Multi Tiff
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tgentry252

USA
5 Posts

Posted - Nov 19 2019 :  12:01:08  Show Profile  Reply
Hello,
I have recently taken over a project that was written in Delphi 10.1. They used imageen v 7.0. My question is this. We have a table that has filenumber, user, images. Each entry has the user name, the filenumber, and a blobfield holding the images. The issue is the images are huge and the program runs into memory errors.
The form has a ImageEnMview and a ImageEnview. The ImageEnMview is loading the images from a blobfield that is used to create a stream. The ImageEnMview is set to ietNormal. This is causing the issue with the memory. If I set the type to ietThumb then this stops the memory issue. The problem is the ImageEnView is now trying to show the thumbnail which is not going to work. I searched and found the TIEDBMultibitmap and now I'm trying to get it to work. When I do the following

fDBMBitmap := TIEDBMultiBitmap.create();
fDBMBitmap.DataSource:=(frmgen.adoptds);
fDBMBitmap.ImageBlobField := 'Images';
Img1.SetExternalMBitmap( fDBMBitmap );

Update ...
I now have the imageEnMview seeing the multitiff like it should.

Using Code
fIEMultiBitmap := TIEMultiBitmap.Create;;
fIEMultiBitmap.Clear;
fIEMultiBitmap.Read( frmgen.adoptqry.FieldByName('images').Value );
Img1.SetExternalMBitmap( fIEMultiBitmap );

I now can not figure out how to get the ImageEnView to load past the 1st image selected in the ImageEnMview.
I have tried the following but now I'm stuck.

fDBBitmap := TIEDBBitmap.create();
fDBBitmap.DataSource := frmgen.adoptds;
fDBBitmap.ImageBlobField := 'Images';
Img2.SetExternalBitmap( fDBBitmap );

ImageEnview shows only the first image of the multi image tiff that is in the blobfield.

How do you get the ImageEnview to move through the images like it would if the storetype was set to ietNormal?

xequte

38611 Posts

Posted - Nov 19 2019 :  17:43:03  Show Profile  Reply
In the OnImageSelect event do something like:

ImageEnView1.IO.Params.ImageIndex := ImageEnMView.SelectedImage;
fDBBitmap.Read();



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

tgentry252

USA
5 Posts

Posted - Nov 20 2019 :  08:10:03  Show Profile  Reply
Thanks Nigel I totally skipped the fDBBitmap.Read(); Works like a charm now.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: