Hello,
I’m trying to use the Graphical Effects to show a blacked out image that can then transition to it’s normal colors. This works fine when I use an Image component but using a MultiResolutionImage component causes some fuzziness.
A screenshot showing what I mean
The one on the left is a MultiResolutionImage and looks awful. The one on the right is an Image and is nice and crisp.
And the simple project code I used for this example:
import Felgo 3.0
import QtQuick 2.0
import QtGraphicalEffects 1.0
GameWindow {
id: gameWindow
activeScene: scene
width: 960
height: 640
Scene {
id: scene
// the "logical size" - the scene content is auto-scaled to match the GameWindow size
width: 480
height: 320
Rectangle {
color: 'coral'
anchors.fill: scene
}
Row{
id: row
anchors.centerIn: parent
Item{
width: img1.width
height: img1.height
MultiResolutionImage{
id: img1
source: "../assets/vplay-logo.png"
visible: false
height: 100
width: 100
}
ColorOverlay{
anchors.fill: img1
source: img1
color: "black"
opacity: 0.5
}
}
Item{
width: img2.width
height: img2.height
Image{
id: img2
source: "../assets/vplay-logo.png"
visible: false
height: 100
width: 100
}
ColorOverlay{
anchors.fill: img2
source: img2
color: "black"
opacity: 0.5
}
}
}
}
}
I am doing something wrong. I’ve used MultiResolutionImage before and they work great without adding QtGraphicalEffects. Perhaps there’s a difference in the way the two image types are rendered?
Using the Blend graphical effect gives the same result. I just used ColorOverlay here to slightly reduce the code in the example.
Any help would be fantastic.
alb