[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another possible gb.poppler bug?


On 12/2/25 12:23 PM, gbWilly wrote:
You could determine if the document has embedded thumbnails, when it is loaded, by testing if a thumbnail for the first page is
found.
>
The application AND example I posted already do that

No, they don't. Your application tests EACH AND EVERY page in succession and renders a thumbnail if needed. I suggested testing only the first page to determine if the entire document has embedded thumbnails.


If thumbnails are not embedded and self-rendering is needed, you could:

Load up a generic, lightweight thumbnail for each page and then use IconView's Draw event to render an appropriate thumbnail, or
Use Tasks to generate the thumbnails.
>
If I render them at 4 dpi it still takes a while.

By "them" do you mean render thumbnails for all pages? That is not what I suggested. My suggestion was to load up a generic, lightweight "placeholder" thumbnail; a thumbnail from a file in your project such as, perhaps, the Gambas logo. And then only when the "real" thumbnail is needed, indicated by a triggering of the IconView Draw event, render the thumbnail from the page. You would, of course, need to determine if the Draw event is due to the initial loading of the generic thumbnails. A boolean semaphore would work for that.


It seems like I have to do it in chunks somehow, but during the rendering the application in non reactive!

So then, don't load them all at once.


P.S. @Benoît, it appears that the IconView Draw event is triggered merely by the mouse cursor hovering over the control. Is that by design? It seems unnecessary.


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>
References:
Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Another possible gb.poppler bug?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Another possible gb.poppler bug?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Another possible gb.poppler bug?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Another possible gb.poppler bug?Lee <t.lee.davidson@xxxxxxxxx>
Re: Another possible gb.poppler bug?gbWilly <gbWilly@xxxxxxxxxxxxxx>