Image, loading *.pkm file(ETC1) issue
Unsolved
QML and Qt Quick
-
Hi,
I'was trying to test the new features from Qt 5.10 and 5.11, and I have a problem with the loading of Image from .pkm file.
I used for my test a png, I conveted it into pkm(etc1) with Mali Texture Compression Tool (v4.3.0) and I test with to "etc1tool".
I can encode and decode from each other without any problem. (png->pkm with one and pkm->png with the other one for example).
So it's seems their is no problem with the generated pkm files.
But when I trying to load one in the QML with Image, It display a black image with the expected size.
This is my code to test it :import QtQuick 2.11 import QtQuick.Window 2.11 Window { id: window visible: true width: 1000 height: 1000 title: qsTr("Hello World") color : "black" Rectangle{ color : "darkgray" x:0 y:0 width:grid.width +20 height: grid.height + 20 Grid { x:10 y:10 id:grid columns: 3 horizontalItemAlignment: Grid.AlignHCenter verticalItemAlignment: Grid.AlignVCenter spacing: 10 Text{text : " "; font.pixelSize: 20} Text{text : "Normal"; font.pixelSize: 20} Text{text : "Pre-alpha"; font.pixelSize: 20} Text{text : ".png"; font.pixelSize: 20} Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon.png"; sourceSize.width: 200; sourceSize.height: 200 } Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon_pre.png"; sourceSize.width: 200; sourceSize.height: 200 } Text{text : "ETC1 (.pkm)"; font.pixelSize: 20} Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon.pkm"} Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon_pre.pkm"} Text{text : "auto pick"; font.pixelSize: 20} Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon"} Image { source: "file:///" + applicationDirPath + "/../../imagine_style_test/assets/fuel_gauge/qt_icon_pre"} } } }
And finally what is displayed :
I test the compilation under linux and windows(mingw) against Qt 5.10 and 5.11.1 : same results.
Can someone help me ?
Thanks