Re: [Interest] QML Image sourceSize bug (?)

2021-03-27 Thread Giuseppe D'Angelo via Interest

On 27/03/2021 15:46, Alexander Dyagilev wrote:


If I enable mipmap, it looks much better comparing to original variant,
but still worse comparing to the final one (described in my original
posting).

I can provide you all the screenshots if you want to.


I can only entertain that mipmapping in your case is going to use 
trilinear interpolation (*) between the 32x32 and the 16x16 mip. And, 
for your particular image ("artwork" / "icon"), that is giving you worse 
results than a 27x27 image scaled directly from the source via bilinear 
interpolation.


There's not much to do about this:

* mipmapping allows you to keep a good visual quality if the displayed 
size of the image changes
* sourceSize allows you to get a good scaled-down version and save on 
memory, but will look awful if now you try to make the image bigger again


(*) didn't check the actual code, just assumed a GL_LINEAR_MIPMAP_LINEAR 
setting.



HTH,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML Image sourceSize bug (?)

2021-03-27 Thread Alexander Dyagilev

First, thank you for your answers :)

If I enable mipmap, it looks much better comparing to original variant, 
but still worse comparing to the final one (described in my original 
posting).


I can provide you all the screenshots if you want to.


On 3/27/2021 4:35 PM, Giuseppe D'Angelo wrote:

On 27/03/2021 11:56, Alexander Dyagilev wrote:

No.

On 3/27/2021 1:24 PM, Giuseppe D'Angelo via Interest wrote:

On 27/03/2021 04:20, Alexander Dyagilev wrote:

Looks better. Why is it so?


Did you enable mipmapping for the first one? 


Well, does it improve it you enable it?

Thanks,


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML Image sourceSize bug (?)

2021-03-27 Thread Giuseppe D'Angelo via Interest

On 27/03/2021 11:56, Alexander Dyagilev wrote:

No.

On 3/27/2021 1:24 PM, Giuseppe D'Angelo via Interest wrote:

On 27/03/2021 04:20, Alexander Dyagilev wrote:

Looks better. Why is it so?


Did you enable mipmapping for the first one? 


Well, does it improve it you enable it?

Thanks,

--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML Image sourceSize bug (?)

2021-03-27 Thread Alexander Dyagilev

No.

On 3/27/2021 1:24 PM, Giuseppe D'Angelo via Interest wrote:

On 27/03/2021 04:20, Alexander Dyagilev wrote:

Looks better. Why is it so?


Did you enable mipmapping for the first one?

Thanks,


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML Image sourceSize bug (?)

2021-03-27 Thread Giuseppe D'Angelo via Interest

On 27/03/2021 04:20, Alexander Dyagilev wrote:

Looks better. Why is it so?


Did you enable mipmapping for the first one?

Thanks,

--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QML Image sourceSize bug (?)

2021-03-26 Thread Alexander Dyagilev

I have PNG image of 256x256 size.

I'm trying to show it on 25x25 size using this code:

Image{

width:25

height:25

fillMode:Image.PreserveAspectFit

horizontalAlignment:Image.AlignHCenter

verticalAlignment:Image.AlignVCenter

source:preview.url

}

I'm getting this:

If I add sourceSize so the code becomes this:

Image{

width:25

height:25

sourceSize.height:25

sourceSize.width:25

fillMode:Image.PreserveAspectFit

horizontalAlignment:Image.AlignHCenter

verticalAlignment:Image.AlignVCenter

source:preview.url

}

I'm getting this:

Looks better. Why is it so?

OS: Windows 10. Screen.devicePixelRatio is 1.0.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest