Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtWebKit - pixelated since 4.8.0
Forum Updated to NodeBB v4.3 + New Features

QtWebKit - pixelated since 4.8.0

Scheduled Pinned Locked Moved General and Desktop
10 Posts 2 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Magnesus
    wrote on last edited by
    #1

    Since 4.8.0 all animated elements in QtWebKit (I use Desktop on Windows, using mingw) are pixelated (and jagged, like they were scaled with a very simple algorithm) for a second and then they are smoothed (like they should be all the time). It's hard to explain in English for me. I tried all kind of settings but didn't manage to fix it. I even reported a bug: https://bugs.webkit.org/show_bug.cgi?id=74600 - but there seems to be nothing happening.

    The description from there: "Transforming images in QtWebKit from Qt 4.8.0 (QtWebKit 2.2.1) gives a pixelated image that after a second switches to smooth version. It looks very bad. It's on Windows XP using Qt 4.8.0. Steps to reproduce: scale a PNG image in img tag. Watch how it behaves after scaling."

    Is there a setting I could try?

    I make my QtWebView like that:

    this->ui->webView->setRenderHint(QPainter::Antialiasing, true);
    this->ui->webView->setRenderHint(QPainter::SmoothPixmapTransform, true);

    Here is a part of a screenshot - on the left is how the graphic looks when moving (in this case it's scrolling of a contents of a div, but it happens in every case when the png image is moving, scaling or rotating), on the right is how it looks after half a second when it stops.

    !http://wieza.iq.pl/beforeafter.png!

    [Edit] Picture link fixed

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Magnesus
      wrote on last edited by
      #2

      I also found this bug reports:
      https://bugs.webkit.org/show_bug.cgi?id=41036
      http://codereview.chromium.org/2881020/show

      Maybe they are related?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Magnesus
        wrote on last edited by
        #3

        Nothing? No one has this problem?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Magnesus
          wrote on last edited by
          #4

          Bump.......

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mlong
            wrote on last edited by
            #5

            Do you have a small piece of sample code which could be used to try to replicate the problem?

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Magnesus
              wrote on last edited by
              #6

              Show any page using jquery in QtWebKit and use this code in Web Inspector:

              $('img').animate({'width':100}, 10000);

              It will slowly scale the images on the page - during that they will be pixelated and will suddenly jump to being smooth after the animation is done.
              It happens also when you set zoom for a webpage like that (so it's not jquery related):

              ui->webView->setZoomFactor(1.5); // anything other than 1.0

              Etc.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mlong
                wrote on last edited by
                #7

                I suppose (having not tested this) that it may be a purposeful behavior, as it's not uncommon to disable smoothing while doing transforms due to the overhead of smoothing. In fact the QML docs actually suggest this for optimization purposes. (See the "Note" "here":http://developer.qt.nokia.com/doc/qt-4.8/qml-text.html#smooth-prop )

                I'm not sure what goes on behind the scenes of QtWebKit, but if this is a common pattern, then it may just be the case.

                I don't have any solid answers, but just offering some comparative insight.

                Software Engineer
                My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Magnesus
                  wrote on last edited by
                  #8

                  This is about text and the effect for images looks REALLY UGLY and it's not there in Qt 4.7.x or any browser I know. Also I didn't find any option to turn it off or on and it's also not always working (sometimes it stays pixelated). How can i turn it off? If I can't I will have to change the library to sth else that uses WebKit. :(

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mlong
                    wrote on last edited by
                    #9

                    FWIW, the same note appears on the Image component's docs too. The gist was more about the concept than the specifics.

                    Software Engineer
                    My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Magnesus
                      wrote on last edited by
                      #10

                      Also there is SmoothPixmapTransform - that should cover it. I have it turned on of course.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved