Menu

#351 Image rendering differs between Qt5 and Qt6 builds.

djview
closed
nobody
None
5
2024-10-18
2022-09-20
Lockywolf
No

The left is Qt6, the right is Qt5. Qt5 is visibly smoother, as if some gaussian smoothing has been applied.
This is only related to rendering though, as when I am exporting a page as an image from the Qt6 version and open it in an image viewer, it looks like the Qt5 version.

Discussion

  • Lockywolf

    Lockywolf - 2022-09-20

    You need to open the image in a dedicated tab, because for some reason, SourceForge does not display it properly.

     
  • Lockywolf

    Lockywolf - 2022-09-20

    Running QT_ENABLE_HIGHDPI_SCALING=0 ./src/djview works. This is somehow related to setAttribute(Qt::AA_UseHighDpiPixmaps, true); not working in Qt6, but I have almost zero knowledge of Qt, so I have not idea how to fix it, and just doing qputenv( "QT_ENABLE_HIGHDPI_SCALING", "0" ); does not actually work.

    UPD: I have inserted that qputenv( "QT_ENABLE_HIGHDPI_SCALING", "0" ); in the main() function, before the QApplication stuff, and it worked. Not sure this is a good solution, but at least it fixes this problem.

     

    Last edit: Lockywolf 2022-09-20
  • Leon Bottou

    Leon Bottou - 2024-10-18

    When the Qt6 reports that the screen implements high dpi scaling ("retina"-style displays), djview , djview generates an image with a higher resolution that matches the true number of pixels and uses this by bypassing the high dpi scaling code. This gives a higher quality image.
    For me, this works as expected.

    The QT_ENABLE_HIGHDPI_SCALING=0 variable disables all this behavior, so that Qt6 matches Qt5's lower quality image. This could be useful to save cycles or memory.

     
  • Leon Bottou

    Leon Bottou - 2024-10-18
    • status: open --> closed
     

Log in to post a comment.