Skip to content

Commit e33b026

Browse files
authored
Merge branch 'AcademySoftwareFoundation:main' into R3D
2 parents 4997379 + 85cca81 commit e33b026

96 files changed

Lines changed: 4654 additions & 1033 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ jobs:
225225
container: aswf/ci-oiio:2025.5
226226
cxx_std: 17
227227
build_type: Debug
228-
ctest_test_timeout: "240"
228+
ctest_test_timeout: "300"
229229
python_ver: "3.11"
230230
simd: "avx2,f16c"
231231
fmt_ver: 11.2.0

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ Release 3.2 (target: Sept 2026?) -- compared to 3.1
88
### ⛰️ New features and public API changes:
99
* *New image file format support:*
1010
* *oiiotool new features and major improvements*:
11+
- `oiiotool --flipdiff` computes the FLIP perceptual difference between two
12+
images, prints statistics, and leaves the error map on the image stack for
13+
further processing or saving. Options: `hdr=1` for HDR-FLIP, `colormap=NAME`
14+
to apply a false-color map (e.g. "magma"), `ppd=N` to override pixels-per-
15+
degree, `tonemapper=NAME` for HDR tonemapper ("aces", "reinhard", "hable").
1116
* *Command line utilities*:
1217
- *iv*: Flip, rotate and save image [#5003](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5003) (by Valery Angelique) (3.2.0.0, 3.1.11.0)
1318
* *ImageBuf/ImageBufAlgo*:
19+
- `ImageBufAlgo::FLIP()` computes the FLIP (eLearning perceptual Image
20+
difference Predictor) metric between two LDR or HDR images. The result is
21+
a single-channel float image with per-pixel FLIP error in [0,1]. A
22+
`FLIPResults` struct returns mean error, max error, and location. The
23+
optional `colormap` kwarg applies a false-color map to the result.
24+
`FLIP_ppd()` helper computes pixels-per-degree for a given display setup.
25+
Python bindings and `oiiotool --flipdiff` are also provided.
1426
- *ImageBuf*: `IB::localpixels_as_[writable_]byte_image_span` [#5011](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5011) (3.2.0.0, 3.1.10.0)
1527
* *ImageCache/TextureSystem*:
1628
- *api/TS*: `IBA::make_texture()` now honors "maketx:threads" hint [#5014](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5014) (3.2.0.0, 3.1.10.0)

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ if (TEX_BATCH_SIZE)
142142
add_compile_definitions (OIIO_TEXTURE_SIMD_BATCH_WIDTH=${TEX_BATCH_SIZE})
143143
endif ()
144144

145+
# If we're building this just for CI, define a symbol so the code can
146+
# tell (and reduce complexity of some tests)
147+
set_option (OIIO_CI "Set if this build is for our GHA CI" OFF)
148+
if (OIIO_CI)
149+
add_compile_definitions (OIIO_CI=1)
150+
endif ()
145151

146152
# Namespace settings
147153
#
@@ -308,7 +314,12 @@ else ()
308314
set (_py_dev_found Python3_Development.Module_FOUND)
309315
endif ()
310316
if (USE_PYTHON AND ${_py_dev_found} AND NOT BUILD_OIIOUTIL_ONLY)
311-
add_subdirectory (src/python)
317+
if (OIIO_BUILD_PYTHON_PYBIND11)
318+
add_subdirectory (src/python)
319+
endif ()
320+
if (OIIO_BUILD_PYTHON_NANOBIND)
321+
add_subdirectory (src/python-nanobind)
322+
endif ()
312323
else ()
313324
message (STATUS "Not building Python bindings: USE_PYTHON=${USE_PYTHON}, Python3_Development.Module_FOUND=${Python3_Development.Module_FOUND}")
314325
endif ()

INSTALL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
4242
* Python >= 3.9 (tested through 3.13).
4343
* pybind11 >= 2.7 (tested through 3.0)
4444
* NumPy (tested through 2.4.4)
45+
* If you enable the optional nanobind (WIP) backend for source/CMake
46+
builds (`OIIO_PYTHON_BINDINGS_BACKEND` is `nanobind` or `both`):
47+
* nanobind discoverable by CMake, or installed in the active Python
48+
environment so `python -m nanobind --cmake_dir` works
4549
* If you want support for PNG files:
4650
* libPNG >= 1.6.0 (tested though 1.6.56)
4751
* If you want support for camera "RAW" formats:
@@ -157,6 +161,12 @@ Make wrapper (`make PkgName_ROOT=...`).
157161

158162
`USE_PYTHON=0` : Omits building the Python bindings.
159163

164+
`OIIO_PYTHON_BINDINGS_BACKEND=pybind11|nanobind|both` : Select which Python
165+
binding backend(s) to configure for source/CMake builds. `both` keeps the
166+
existing pybind11 module and also builds the nanobind (WIP) module. The
167+
Python packaging path driven by `pyproject.toml` still targets the production
168+
pybind11 bindings today.
169+
160170
`OIIO_BUILD_TESTS=0` : Omits building tests (you probably don't need them
161171
unless you are a developer of OIIO or want to verify that your build
162172
passes all tests).
@@ -247,6 +257,7 @@ Additionally, a few helpful modifiers alter some build-time options:
247257
| make USE_QT=0 ... | Skip anything that needs Qt |
248258
| make MYCC=xx MYCXX=yy ... | Use custom compilers |
249259
| make USE_PYTHON=0 ... | Don't build the Python binding |
260+
| make OIIO_PYTHON_BINDINGS_BACKEND=both ... | For source/CMake builds, build the existing pybind11 bindings and the nanobind (WIP) module |
250261
| make BUILD_SHARED_LIBS=0 | Build static library instead of shared |
251262
| make IGNORE_HOMEBREWED_DEPS=1 | Ignore homebrew-managed dependencies |
252263
| make LINKSTATIC=1 ... | Link with static external libraries when possible |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ MY_CMAKE_FLAGS += -DTEX_BATCH_SIZE:STRING="${TEX_BATCH_SIZE}"
159159
endif
160160

161161
ifneq (${TEST},)
162-
TEST_FLAGS += -R ${TEST}
162+
TEST_FLAGS += -R '${TEST}'
163163
endif
164164

165165
ifneq (${USE_CCACHE},)

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,15 @@ it and potentially be able to answer your question quickly (more so than a GH
123123
"issue"). For quick questions, you could also try the [ASWF
124124
Slack](https://slack.aswf.io) `#openimageio` channel.
125125

126-
Bugs, build problems, and discovered vulnerabilities that you are relatively
127-
certain is a legit problem in the code, and **for which you can give clear
128-
instructions for how to reproduce**, should be [reported as
126+
A bug or build problem that you are relatively certain is a legit problem in
127+
the code, and **for which you can give clear instructions for how to
128+
reproduce**, should be [reported as
129129
issues](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues).
130130

131+
To report a security vulnerability that is serious enough that it should not
132+
be discussed publicly until a patch is ready, please file a GitHub [security
133+
advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/new).
134+
131135
If confidentiality precludes a public question or issue, you may contact us
132136
privately at [info@openimageio.org](info@openimageio.org), or for
133137
security-related issues [security@openimageio.org](security@openimageio.org).

SECURITY.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ security vulnerabilities.
1616
## Reporting a Vulnerability
1717

1818
If you think you've found a potential vulnerability in OpenImageIO, please
19-
report it by emailing security@openimageio.org. Only the project administrators
20-
have access to these messages. Include detailed steps to reproduce the issue,
21-
and any other information that could aid an investigation. Our policy is to
22-
respond to vulnerability reports within 14 days.
19+
report it to the maintainers. Include detailed steps to reproduce the issue,
20+
and any other information that could aid an investigation.
2321

24-
Our policy is to address critical security vulnerabilities rapidly and post
25-
patches as quickly as possible.
22+
The best way to report a vulnerability is to file a GitHub [security
23+
advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/new).
24+
If that is not possible, it is also fine to email your report to
25+
security@openimageio.org. Only the project administrators have access to these
26+
reports.
2627

28+
Our policy is to respond to vulnerability reports within 14 days, and to
29+
address critical security vulnerabilities rapidly and post patches as quickly
30+
as possible.
2731

2832
## Other security features
2933

@@ -44,7 +48,7 @@ None known
4448

4549
## History of CVE Fixes
4650

47-
Most recent fixes listed first, more or less
51+
Most recent fixes listed first, more or less:
4852

4953
- CVE-2024-40630: Fixed incorrect image size for certain HEIC files.
5054
[advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-jjm9-9m4m-c8p2) (Fixed in 2.5.13.1)

src/bmp.imageio/bmpinput.cpp

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,28 @@ BmpInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
395395
if ((m_dib_header.compression == RLE4_COMPRESSION
396396
|| m_dib_header.compression == RLE8_COMPRESSION)
397397
&& m_colortable.size()) {
398-
for (int x = 0; x < m_spec.width; ++x) {
399-
int p = m_uncompressed[int64_t(m_spec.height - 1 - y) * m_spec.width
400-
+ x];
401-
auto& c = colortable(p);
402-
mscanline[3 * x] = c.r;
403-
mscanline[3 * x + 1] = c.g;
404-
mscanline[3 * x + 2] = c.b;
398+
if (m_spec.nchannels == 1) {
399+
OIIO_CONTRACT_ASSERT(m_allgray);
400+
for (int x = 0; x < m_spec.width; ++x) {
401+
int p
402+
= m_uncompressed[int64_t(m_spec.height - 1 - y) * m_spec.width
403+
+ x];
404+
auto& c = colortable(p);
405+
mscanline[x] = c.r;
406+
// For the "all gray" case, rgb are equal and we're filling in
407+
// a 1-channel data buffer.
408+
}
409+
} else {
410+
OIIO_CONTRACT_ASSERT(m_spec.nchannels == 3);
411+
for (int x = 0; x < m_spec.width; ++x) {
412+
int p
413+
= m_uncompressed[int64_t(m_spec.height - 1 - y) * m_spec.width
414+
+ x];
415+
auto& c = colortable(p);
416+
mscanline[3 * x] = c.r;
417+
mscanline[3 * x + 1] = c.g;
418+
mscanline[3 * x + 2] = c.b;
419+
}
405420
}
406421
return true;
407422
}

src/build-scripts/ci-startup.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages:$P
3636
export COMPILER=${COMPILER:=gcc}
3737
export CC=${CC:=gcc}
3838
export CXX=${CXX:=g++}
39-
export OpenImageIO_CI=true
39+
export OpenImageIO_CI=1
4040
export USE_NINJA=${USE_NINJA:=1}
4141
export CMAKE_GENERATOR=${CMAKE_GENERATOR:=Ninja}
4242
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}

src/cmake/externalpackages.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,13 @@ endif()
118118
if (USE_PYTHON)
119119
find_python()
120120
endif ()
121-
if (USE_PYTHON)
121+
if (USE_PYTHON AND OIIO_BUILD_PYTHON_PYBIND11)
122122
checked_find_package (pybind11 REQUIRED VERSION_MIN 2.7)
123123
endif ()
124+
if (USE_PYTHON AND OIIO_BUILD_PYTHON_NANOBIND)
125+
discover_nanobind_cmake_dir()
126+
checked_find_package (nanobind CONFIG REQUIRED)
127+
endif ()
124128

125129

126130
###########################################################################

0 commit comments

Comments
 (0)