jpegview icon indicating copy to clipboard operation
jpegview copied to clipboard

[BUG] Flickering when zooming

Open RndUsr123 opened this issue 1 year ago • 3 comments

When zooming in/out in steps and zoom > Fit window to image is used, some flickering happens. This is especially obvious at a reduced screen refresh rate and seems to be caused by a render timing issue: the image is moved first and scaled second. This behavior happens when smoothly zooming too, but it's harder to notice. For the record, any zoom-capable device is affected (5 tested).

RndUsr123 avatar Feb 20 '24 17:02 RndUsr123

This happened to me too, see GIF :

GIF

TCOTC avatar Aug 24 '24 05:08 TCOTC

Since this was opened, I've made some progress in identifying the cause: I created a few very simple applications in Python and C# with this feature and I'm positive this is likely a Windows bug!

Before I worked around this issue specifically (more on this later), each of my attempts had presented the very same symptoms of misaligned scaling and moving, thus a jagged appearance. What's interesting, however, is that the one python demo I also tested on MacOS works flawlessly there, with little to no code changes.

While this might very well be caused by a flawed Windows implementation of the Python GUI module I used, my guess is Windows' display composition is sub-par compared to MacOS', so problems arise (from my experience Windows is consistently more choppy in basic operations like window moving and scaling, despite the better hardware).

Luckily, this problem is potentially solvable as I was then able to significantly reduce its visiblity in Python; I did so by changing window size and image size one frame and window position the next, which seems to work consistently. This could be related to some quirk in Python/OpenGL (or my demo app), but it got my hopes up that a fix is possible.

https://github.com/user-attachments/assets/fcdbe575-6835-47bd-9103-a32e49fa27c5

RndUsr123 avatar Aug 26 '24 02:08 RndUsr123

cool

TCOTC avatar Aug 26 '24 02:08 TCOTC