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
 LoadFromFileOnDemand and Events
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graph_man

326 Posts

Posted - May 18 2015 :  17:53:27  Show Profile  Reply
I use LoadFromFileOnDemand and I need to perform certain actions when loading each page.
What event should I use?

w2m

USA
1990 Posts

Posted - May 18 2015 :  18:02:57  Show Profile  Reply
I believe you are looking for OnImageAdd.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - May 18 2015 :  18:24:28  Show Profile  Reply
It doesn't work with my multipage file and this code

ImageEnMView2->LoadFromFileOnDemand(TempFileTiff, false);
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 18 2015 :  18:28:00  Show Profile  Reply
What do you mean it does not work? OnImageAdd occurs whenever an image is added or when using TImageEnMView.FillFromDirectory as noted in the help file.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - May 19 2015 :  04:40:37  Show Profile  Reply
I don't use
TImageEnMView.FillFromDirectory
I use
ImageEnMView2->LoadFromFileOnDemand(TempFileTiff, false);
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 19 2015 :  15:49:13  Show Profile  Reply
I could be wrong of course, but I do not think there is an event that will execute that will allow processing a thumbnail frame bitmap when using LoadFromFileOnDemand. LoadFileOnDemand is mainly used for loading the frames of files with large number of frames (such as videos).


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - May 19 2015 :  16:26:22  Show Profile  Reply
It is a pity. I want this event to work with multi-page files.
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 19 2015 :  16:29:38  Show Profile  Reply
It should work if you do not use LoadFromFileOnDemand. Try otherways to load the frames and put a break point in the event with a showmessage('I am in the xxx event') Not all of the events have a bitmap that you can process.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

38510 Posts

Posted - May 20 2015 :  00:35:33  Show Profile  Reply
Hi

Please advise what you are attempting to do, and I can advise the best way to do it.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

graph_man

326 Posts

Posted - May 20 2015 :  04:33:53  Show Profile  Reply
At loading images in the ImageEmMView I need to read some parameters (Params) and add them to "ImageInfoText"
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 20 2015 :  10:25:03  Show Profile  Reply
I wish you had said that to begin with. I thought you wanted to process the bitmap. To add text to the frames use the GetText event.
procedure TForm1.ImageEnMView1GetText(Sender: TObject; Index: Integer;
  Position: TIEMTextPos; var Text: WideString);
var
  iBitDepth: Integer;
  iColor: string;
begin
  { Set the bottom text }
  ImageEnMView1.ImageBottomText[Index] := 'Frame ' + IntToStr(Index + 1);
  iBitDepth := ImageEnMView1.MIO.Params[Index].BitsPerSample *
    ImageEnMView1.MIO.Params[Index].SamplesPerPixel;
  if iBitDepth = 24 then
    iColor := 'RGBA 32-Bit'
  else
    iColor := 'RGB ' + IntToStr(iBitDepth) + '-Bit';
  { Set the info text }
  ImageEnMView1.ImageInfoText[Index] := iColor;
  ImageEnMView1.UpdateImage(Index);
  ImageEnMView1.Update;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - Jun 01 2015 :  19:48:29  Show Profile  Reply
I need an event that occurs once at frame (page) loading.
This event occurs continuously during redrawing.
Go to Top of Page

xequte

38510 Posts

Posted - Jun 04 2015 :  15:57:37  Show Profile  Reply
Hi

I'll see if we can add a relevant event for the next update.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

xequte

38510 Posts

Posted - Jun 22 2015 :  18:21:54  Show Profile  Reply
In the next release you can use the OnImageLoaded event. Also, the OnAllDisplayed event occurs after loading completes for all images.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

graph_man

326 Posts

Posted - Jun 22 2015 :  18:29:20  Show Profile  Reply
Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: