aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2017-12-06 16:24:53 +0100
committerTony Sarajärvi <tony.sarajarvi@qt.io>2018-02-01 06:39:27 +0000
commitf6a5820cc1f268436eb8074531002790bc214df7 (patch)
tree2ab687aab6eee46961e55bd1d84557454fa25bb7 /tests
parentf5abe488f1e7c9c31badd0622b7374648bea943a (diff)
Add basic handler for ktx format texture files
This adds basic support for reading compressed textures stored in .ktx files, the Khronos texture file format. Change-Id: Iafb86cff9607eedb26a73989f9b005455ddd316f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmltest/image/car.ktxbin0 -> 11908 bytes
-rw-r--r--tests/auto/qmltest/image/tst_image.qml10
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qmltest/image/car.ktx b/tests/auto/qmltest/image/car.ktx
new file mode 100644
index 0000000000..2aefdd306b
--- /dev/null
+++ b/tests/auto/qmltest/image/car.ktx
Binary files differ
diff --git a/tests/auto/qmltest/image/tst_image.qml b/tests/auto/qmltest/image/tst_image.qml
index 6385db7fbb..346bee6969 100644
--- a/tests/auto/qmltest/image/tst_image.qml
+++ b/tests/auto/qmltest/image/tst_image.qml
@@ -127,6 +127,11 @@ Item {
source: "logo.pkm"
}
+ Image {
+ id: ktxImage
+ source: "car.ktx"
+ }
+
TestCase {
name: "Image"
@@ -231,5 +236,10 @@ Item {
compare(pkmImage.width, 256)
compare(pkmImage.height, 256)
}
+
+ function test_ktxImage() {
+ compare(ktxImage.width, 146)
+ compare(ktxImage.height, 80)
+ }
}
}