[Interest] QML: non scaled image strange issue under Linux
Fatih Uzunoğlu
fuzun54 at outlook.com
Sat Jul 23 19:12:30 CEST 2022
Hi,
In case OpenGL is used, this might be a bug in your OpenGL driver.
As far as I know; Qt uses `GL_NEAREST` when `smooth` is unset, and
`GL_LINEAR` when `smooth` is set.
I doubt there is extra logic to check if the texture size is the same as
`Image` size that it uses `GL_NEAREST` regardless of `smooth` property.
I think the docs should say something like "this is the expected
behavior of the driver", about the `smooth` property.
You might consider using something like: `smooth: (paintedWidth !==
width) || (paintedHeight !== height) `.
I think it would be better if Qt did not use `GL_LINEAR` in these cases
by default:
- Texture size is the same as `Image` size.
- `Image` size is non-fractional upscaling of the texture size. (Integer
upscale)
That being said, I don't know how Qt RHI behaves. This is valid for
direct OpenGL.
On 23/07/2022 03:40, Alexander Dyagilev wrote:
> Hello,
>
> I'm generating image (QR code) using QML image provider. Show it using
> Image control using actual size (i.e. width height are not specified,
> and I also set fill mode to Pad).
>
> Windows and macOS - works fine.
>
> Linux (Ubuntu) - it's shown blurred. If I set smooth property to false
> - it's shown as expected.
>
> Is it a bug? In docs it's stated that smooth has no effect if image is
> not scaled.
>
> Qt 5.12.12.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220723/d7ea861a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4490 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220723/d7ea861a/attachment.bin>
More information about the Interest
mailing list