Skip to content

Commit 2a5fc74

Browse files
committed
test: add test case for reading Ultra HDR image
Signed-off-by: loicvital <[email protected]>
1 parent 53deb76 commit 2a5fc74

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

src/cmake/testing.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ macro (oiio_add_all_tests)
263263
oiio_add_tests (iff
264264
ENABLEVAR ENABLE_IFF
265265
IMAGEDIR oiio-images URL "Recent checkout of OpenImageIO-images")
266+
oiio_add_tests (jpeg-ultrahdr
267+
FOUNDVAR libuhdr_FOUND
268+
IMAGEDIR oiio-images URL "Recent checkout of OpenImageIO-images")
266269
oiio_add_tests (jpeg2000
267270
FOUNDVAR OPENJPEG_FOUND
268271
IMAGEDIR oiio-images URL "Recent checkout of OpenImageIO-images")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
4080 x 3072, 4 channel, float jpeg
2+
Stats Min: 0.000000 0.000000 0.000000 1.000000 (float)
3+
Stats Max: 1.000000 1.000000 1.000000 1.000000 (float)
4+
Stats Avg: 0.068257 0.077759 0.100931 1.000000 (float)
5+
Stats StdDev: 0.100425 0.102336 0.107618 0.000000 (float)
6+
Stats NanCount: 0 0 0 0
7+
Stats InfCount: 0 0 0 0
8+
Stats FiniteCount: 12533760 12533760 12533760 12533760
9+
Constant: No
10+
Monochrome: No

testsuite/jpeg-ultrahdr/run.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python
2+
3+
# Copyright Contributors to the OpenImageIO project.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# https://github.com/AcademySoftwareFoundation/OpenImageIO
6+
7+
8+
# read and print stats, that tests the read
9+
command += oiiotool (OIIO_TESTSUITE_IMAGEDIR+"/jpeg/ultrahdr/sky.jpg --printstats")

0 commit comments

Comments
 (0)