View Single Post
Old 11-17-2023, 07:13 PM   #191
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,883
Karma: 6120478
Join Date: Nov 2009
Device: many
I did an internet search on this and blank images in python/tk are usually caused by the image data itself being garbage collected by python. The way to prevent garbage collection of an image object is to keep a pointer to the image around until after the image is displayed/used.

Perhaps that is what is at play here?

In AccessAide which made thumbnail images, I needed to keep a pointer to both the full image and its thumbnail version to prevent both from being destroyed by garbage collection. They were linked. See the code starting here: https://github.com/kevinhendricks/Ac...cessgui.py#L98


In this plugin's code, I see copy() being used on Image objects but I am not sure that will keep a pointer to the original Image data and the thumbnail version.

That might be worth looking into.

Last edited by KevinH; 11-17-2023 at 07:58 PM.
KevinH is offline   Reply With Quote