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
 LoadFronFileOnDemand issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

graph_man

240 Posts

Posted - Oct 05 2020 :  14:11:55  Show Profile  Reply
Why when using LoadFromFileOnDemand
I often see a blue question marks instead of some thumbnails?

xequte

5607 Posts

Posted - Oct 06 2020 :  16:20:37  Show Profile  Reply
Hi

Can you give me more information to reproduce this?



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

graph_man

240 Posts

Posted - Oct 06 2020 :  17:12:56  Show Profile  Reply
I use "LoadFromFileOnDemand" command to load my file.
When scrolling, I see that not all thumbnail contain a real image, instead of them there is a blue question mark.
Go to Top of Page

xequte

5607 Posts

Posted - Oct 06 2020 :  17:48:24  Show Profile  Reply
Hi

What sort of file is it?

Does it happen only in your app or a simple demo too?

Is there any pattern to the failure?

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

graph_man

240 Posts

Posted - Oct 07 2020 :  05:49:38  Show Profile  Reply
> What sort of file is it?

Multipage TIFF files.

> Does it happen only in your app or a simple demo too?

What simple demo I can to check this error. (I need StoreType = ietThumb)

> Is there any pattern to the failure?

There is not.
Go to Top of Page

xequte

5607 Posts

Posted - Oct 08 2020 :  00:46:56  Show Profile  Reply
Please forward me a sample TIFF file that reproduces this.



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

graph_man

240 Posts

Posted - Oct 08 2020 :  06:43:13  Show Profile  Reply
I have sent it.
Go to Top of Page

graph_man

240 Posts

Posted - Oct 08 2020 :  16:29:59  Show Profile  Reply
A question mark appears when scrolling quickly. If you scroll very slowly through one thumbnail, then the mark appears very rarely.

I noticed one strange behavior.

I trying to use OnCreateParams event to add text ImageInfoText
(I need to display one of the page parameters)
and in this case ALL thumbnails with a question mark.
Why? How to fix it?

Go to Top of Page

xequte

5607 Posts

Posted - Oct 10 2020 :  18:51:25  Show Profile  Reply
Hi

Use the Image*Text properties instead, e.g.

ImageEnMView1.LoadFromFileOnDemand('C:\input.mpeg');
for i := to ImageEnMView1.ImageCount - 1 do
  ImageEnMView1.ImageTopText[i] = 'Frame ' + IntToStr( i + 1 );


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

graph_man

240 Posts

Posted - Oct 10 2020 :  20:12:22  Show Profile  Reply
As said earlier:
I need to display one of the page parameters.

And this will significantly slow down the program.
You will have to iterate over ALL pages, not just the selected ones.
Go to Top of Page

graph_man

240 Posts

Posted - Oct 10 2020 :  20:19:11  Show Profile  Reply
Why I see the blue question mark instead of ALL thumbnails at using OnCreateParams event?
Go to Top of Page

xequte

5607 Posts

Posted - Oct 11 2020 :  17:07:26  Show Profile  Reply
Please show me your code.



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

graph_man

240 Posts

Posted - Oct 11 2020 :  17:31:43  Show Profile  Reply
void __fastcall TAFTV_FormMain::ImageEnMView2CreateParams(TObject *Sender, int idx,
TIOParams *Params)
{
ImageEnMView2->ImageTopText[idx] =
LangChanger1->TranslateMessage("Page") + " " + IntToStr(idx + 1);

int AnnotCount = Params->ImagingAnnot->ObjectsCount;
AnnotCount = AnnotCount + Params->ImageEnAnnot->ObjectsCount;

if (AnnotCount == 0)
{
ImageEnMView2->ImageInfoText[idx] = "";
}
else
{
ImageEnMView2->ImageInfoText[idx] = "Annot.=" + IntToStr(AnnotCount);
}
}
//---------------------------------------------------------------------------
Go to Top of Page

xequte

5607 Posts

Posted - Oct 14 2020 :  00:08:10  Show Profile  Reply
Hi

I added a TImageEnMView to a new project, added a button and added these events:


procedure TMainForm.Button1Click(Sender: TObject);
begin
  ImageEnMView1.SetModernStyling( True, 0, 0, False );
  ImageEnMView1.LoadFromFileOnDemand('d:\TestFile1.tif');
end;


procedure TMainForm.ImageEnMView1CreateParams(Sender: TObject; idx: Integer; Params: TIOParams);
var
  annotCount: Integer;
begin
  ImageEnMView1.ImageTopText[idx] := 'Page ' + IntToStr(idx + 1);

  annotCount := Params.ImagingAnnot.ObjectsCount + Params.ImageEnAnnot.ObjectsCount;
  if annotCount = 0 then
    ImageEnMView1.ImageInfoText[idx] := ''
  else
    ImageEnMView1.ImageInfoText[idx] := 'Annot.=' + IntToStr(annotCount);
end;


I could not reproduce any issue.

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

graph_man

240 Posts

Posted - Oct 14 2020 :  09:06:13  Show Profile  Reply
StoreType = ietThumb ???
Go to Top of Page

xequte

5607 Posts

Posted - Oct 14 2020 :  22:15:32  Show Profile  Reply
Hi

I tried ietNormal and ietThumb. It didn't make a difference in my tests.

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

graph_man

240 Posts

Posted - Oct 15 2020 :  10:38:23  Show Profile  Reply
Did you use the file I sent to you?
Go to Top of Page

xequte

5607 Posts

Posted - Oct 15 2020 :  15:27:38  Show Profile  Reply
Yes, I used the same TIFF file. Can you try creating a simple demo with only the code above and see if you still see the issue?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: