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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Show the pages of a PDF file as thumbnails?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Dec 24 2016 : 22:21:58
Hello!

Which is the FASTEST method to show the pages of a PDF file as thumbnails in a TImageEnMView?

I would have to load the page images into a TIEMultiBitmap, then I need the page images to show as thumbnails in several different TImageEnMView instances (not at the same time of course but consecutively).
9   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Dec 27 2016 : 14:08:35
Hi Bill,

sorry for having mistaken you for Nigel and thank you for your comments!

In fact, I have developed myself a method to load the thumbnails for the 219 pages PDF I use for testing in 5 seconds, where the plugin takes 35 seconds! What I hoped was that the plugin would be faster than my method but in fact, it is much slower.

I have set the ImageCacheSize to 500 and StoreType to ietThumb (as I need to resize the thumbnails later on).

For my purpose, I don't need to show an enlarged image of a thumbnail, I just need the thumbnails from the PDF pages.

What I couldn't figure out yet was how to use multi-threading to speed up the rendering of my PDF pages into bitmaps.
w2m Posted - Dec 27 2016 : 12:49:13
I am not Nigel. I am a developer just like you.

As far as the speed, did you try setting ImageEnMView1.StoreType := ietFastThumb and set the ImageEnMView1.ImageCacheSize := 300? If this is still too slow, I do not believe there is a faster way to do this because the component is using a thread to load the frames and only loads frames as they are required... when they become visible. I also do not think any other thumbnail component will be faster.

As an alternative to using thumbnails take a look at the PDFImageEn Demo that shipped with the wpcubed_pdf_plugin. This uses buttons to select the previous and next frames and will be much faster the multi demo. If that is not satisfactory I have run out of suggestions.

How big are the images you are loading?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
PeterPanino Posted - Dec 27 2016 : 12:34:18
Aside from that: Is it possible to fill the ImageEnMView1 very fast with fake (empty) thumbnails, let's say a few hundred in 0.1 seconds? That could help me with another approach.
PeterPanino Posted - Dec 27 2016 : 12:12:14
Hi Nigel,

thank you for your advice, but it is still too slow for my specific purpose.
And even when I set the second parameter Append to True the scrolling back and forth through the thumbnails is still a pain.
w2m Posted - Dec 27 2016 : 09:17:22
Try
ImageEnMView1.LoadFromFileOnDemand(FileName);
this will be much faster than LoadFromFile because all the frames are loaded as needed, not all at once.

If that is not fast enough for you, then set the ImageEnMView1.StoreType := ietThumb or ietFastThumb to load a thumbnail rather than the normal image. To display the full frame in ImageEnView1 instead of the thumbnail use:
procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
begin
  ImageEnView1.IO.Params.ImageIndex := idx;
  ImageEnView1.IO.LoadFromFile(ImageEnMView1.MIO.Params[idx].FileName);
  ImageEnView1.Update;
end;

If you are using ietFastThumb then you should significantly increase the ImageCacheSize to something larger, such as 200.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
PeterPanino Posted - Dec 27 2016 : 06:30:52
Hi Nigel,

I've purchased the WPViewPDF plug-in for 59 Euro.

It takes 35 seconds (!!!) to load the page thumbnails from a 219 pages PDF file!!!

This is unusable! Is there a way to optimize this? If not I'll ask for a refund.
PeterPanino Posted - Dec 25 2016 : 13:22:07
OK, it's very easy:

ImageEnMView1.AssignEx(ThisMultiBitmap);
ImageEnMView2.AssignEx(ThisMultiBitmap);
PeterPanino Posted - Dec 25 2016 : 12:12:21
Thanks, I will consider buying the plug-in.

But another question:

I have filled a iexBitmaps.TIEMultiBitmap with Bitmaps. Now how can I show these Bitmaps in multiple TImageEnMView controls?
xequte Posted - Dec 25 2016 : 03:55:30
Hi Peter

Assuming you are using the WPViewPDF plug-in then why not use ImageEnMView1.MIO.LoadFromFile(...);

That will load all pages as thumbnails.

You can set ImageEnMView1.StoreType := ietThumb; to reduce memory overhead.




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com