Browser cannot detect newly created pictures

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Seith
Posts: 9
Joined: Sat May 25, 2024 10:39 am

Browser cannot detect newly created pictures

Post by Seith »

Hello, I've met what looks like a bug with the browser's image detection when a new image is created via Python code (using PIL): It looks like XnView's browser cannot detect it. You have to click on another folder and then back on the folder where the new image was created. And only then does XnView MP see it as any other picture.

I suspect it's because while the image (.png) is getting created (it takes a couple of seconds) it's not technically readable yet as an image, and so XnViews bails out (the empty thumbnail flashes briefly before disappearing). But when the image is done writing the browser should then detect it as a new picture but it doesn't. It's like the browser already attempted to read it once and failed (since it wasn't readable at the time) and keeps the trace of that event. So when the image finally becomes readable XnView "remembers" that it wasn't readable before and ignores it.

No amount of pressing F5 to refresh the browser can trigger it to "see" the new picture. As I said you have to click on another folder and then back on the folder containing the new picture in order to force the browser to detect the new picture.

Please note that this works correctly on the classic XnView: While the new picture is getting created there's an empty thumbnail icon that appears as a place-holder in the browser which then changes to the actual picture thumbnail once it's done being created. Which is the expected behaviour.

Is this a bug or do I need to activate a certain setting in XnView MP for it to work as classic?

I'm on Windows 10.
User avatar
xnview
Author of XnView
Posts: 45337
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Browser cannot detect newly created pictures

Post by xnview »

do you have a way to reproduce the problem?
Pierre.
Seith
Posts: 9
Joined: Sat May 25, 2024 10:39 am

Re: Browser cannot detect newly created pictures

Post by Seith »

xnview wrote: Mon Jun 03, 2024 1:23 pm do you have a way to reproduce the problem?
Hey Pierre, unfortunately I don't, I'm sorry. But the good news is I found a way to bypass the problem.

I suppose I was doing something too "hacky" in Python. It is strange that it's working in xnView classic and not in MP, but as I said, it's not a problem anymore... :)

Cheers!