mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Write tests for hej2 format
This commit is contained in:
parent
9bee29cc01
commit
473f5d9847
@ -122,6 +122,9 @@ if (LibHeif_FOUND)
|
||||
kimageformats_read_tests(FUZZ 1
|
||||
hej2
|
||||
)
|
||||
kimageformats_write_tests(FUZZ 1
|
||||
hej2-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.19.6")
|
||||
|
65
autotests/write/basic/hej2.json
Normal file
65
autotests/write/basic/hej2.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"format" : "hej2",
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"value" : "2025-01-14T13:53:32+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Direction",
|
||||
"value" : "123.7"
|
||||
},
|
||||
{
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-14T15:58:44+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "Adobe Photoshop 26.2 (Windows)"
|
||||
},
|
||||
{
|
||||
"key" : "Altitude",
|
||||
"value" : "34"
|
||||
},
|
||||
{
|
||||
"key" : "Author",
|
||||
"value" : "KDE Project"
|
||||
},
|
||||
{
|
||||
"key" : "Copyright",
|
||||
"value" : "@2025 KDE Project"
|
||||
},
|
||||
{
|
||||
"key" : "Description",
|
||||
"value" : "TV broadcast test image."
|
||||
},
|
||||
{
|
||||
"key" : "Latitude",
|
||||
"value" : "44.6478"
|
||||
},
|
||||
{
|
||||
"key" : "LensManufacturer",
|
||||
"value" : "KDE Glasses"
|
||||
},
|
||||
{
|
||||
"key" : "LensModel",
|
||||
"value" : "A1234"
|
||||
},
|
||||
{
|
||||
"key" : "Longitude",
|
||||
"value" : "10.9254"
|
||||
},
|
||||
{
|
||||
"key" : "Manufacturer",
|
||||
"value" : "KFramework"
|
||||
},
|
||||
{
|
||||
"key" : "Model",
|
||||
"value" : "KImageFormats"
|
||||
}
|
||||
],
|
||||
"resolution" : {
|
||||
"dotsPerMeterX" : 11811,
|
||||
"dotsPerMeterY" : 11812
|
||||
}
|
||||
}
|
BIN
autotests/write/format/hej2/Format_A2BGR30_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_A2BGR30_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_A2RGB30_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_A2RGB30_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB32.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB32.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB32_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB32_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB4444_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB4444_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB6666_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB6666_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB8555_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB8555_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_ARGB8565_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_ARGB8565_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_BGR30.hej2
Normal file
BIN
autotests/write/format/hej2/Format_BGR30.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_BGR888.hej2
Normal file
BIN
autotests/write/format/hej2/Format_BGR888.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_CMYK8888.hej2
Normal file
BIN
autotests/write/format/hej2/Format_CMYK8888.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_Grayscale16.hej2
Normal file
BIN
autotests/write/format/hej2/Format_Grayscale16.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_Grayscale8.hej2
Normal file
BIN
autotests/write/format/hej2/Format_Grayscale8.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_Indexed8.hej2
Normal file
BIN
autotests/write/format/hej2/Format_Indexed8.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_Mono.hej2
Normal file
BIN
autotests/write/format/hej2/Format_Mono.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_MonoLSB.hej2
Normal file
BIN
autotests/write/format/hej2/Format_MonoLSB.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB16.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB16.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB30.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB30.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB32.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB32.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB444.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB444.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB555.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB555.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB666.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB666.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGB888.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGB888.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA16FPx4.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA16FPx4.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA16FPx4_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA16FPx4_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA32FPx4.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA32FPx4.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA32FPx4_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA32FPx4_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA64.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA64.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA64_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA64_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA8888.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA8888.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBA8888_Premultiplied.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBA8888_Premultiplied.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBX16FPx4.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBX16FPx4.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBX32FPx4.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBX32FPx4.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBX64.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBX64.hej2
Normal file
Binary file not shown.
BIN
autotests/write/format/hej2/Format_RGBX8888.hej2
Normal file
BIN
autotests/write/format/hej2/Format_RGBX8888.hej2
Normal file
Binary file not shown.
@ -634,14 +634,18 @@ int main(int argc, char **argv)
|
||||
const QList<QByteArray> read_formats = QImageReader::supportedImageFormats();
|
||||
const QList<QByteArray> write_formats = QImageWriter::supportedImageFormats();
|
||||
|
||||
if (!read_formats.contains(format) && format == "heif") {
|
||||
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary decoder(s)!\n";
|
||||
return 0;
|
||||
if (!read_formats.contains(format)) {
|
||||
if (format == "heif" || format == "hej2") {
|
||||
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary decoder(s)!\n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!write_formats.contains(format) && format == "heif") {
|
||||
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary encoder(s)!\n";
|
||||
return 0;
|
||||
if (!write_formats.contains(format)) {
|
||||
if (format == "heif" || format == "hej2") {
|
||||
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary encoder(s)!\n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// run test
|
||||
|
Loading…
Reference in New Issue
Block a user