Skip to content

Commit 6ad65af

Browse files
committed
hdr overhaul
* Add full IOProxy support to both input and output. * This necessitated a major refactor, including sucking the I/O specific code from rgbe.{cpp,h} into hdr{input,output}.cpp and getting rid of the old files. * Add a testsuite entry for hdr (shockingly, there was none before)
1 parent 3e9cbd1 commit 6ad65af

File tree

10 files changed

+548
-702
lines changed

10 files changed

+548
-702
lines changed

src/cmake/compiler.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ if (PROJECT_IS_TOP_LEVEL)
450450
"src/cineon.imageio/libcineon/*"
451451
"src/dds.imageio/squish/*"
452452
"src/gif.imageio/gif.h"
453-
"src/hdr.imageio/rgbe.cpp"
454453
"src/libutil/stb_sprintf.h"
455454
CACHE STRING "Glob patterns to exclude for clang-format")
456455
find_program (CLANG_FORMAT_EXE

src/cmake/testing.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ macro (oiio_add_all_tests)
247247
oiio_add_tests (gif
248248
FOUNDVAR GIF_FOUND ENABLEVAR ENABLE_GIF
249249
IMAGEDIR oiio-images URL "Recent checkout of oiio-images")
250+
oiio_add_tests (hdr
251+
ENABLEVAR ENABLE_HDR
252+
IMAGEDIR openexr-images
253+
URL http://github.com/AcademySoftwareFoundation/openexr-images)
250254
oiio_add_tests (heif
251255
FOUNDVAR Libheif_FOUND ENABLEVAR ENABLE_Libheif
252256
URL https://github.com/nokiatech/heif/tree/gh-pages/content)

src/doc/builtinplugins.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,47 @@ preferred except when legacy file access is required.
638638
- the gamma correction specified in the RGBE header (if it's gamma corrected).
639639

640640

641+
**Configuration settings for HDR input**
642+
643+
When opening an HDR ImageInput with a *configuration* (see
644+
Section :ref:`sec-inputwithconfig`), the following special configuration
645+
options are supported:
646+
647+
.. list-table::
648+
:widths: 30 10 65
649+
:header-rows: 1
650+
651+
* - Input Configuration Attribute
652+
- Type
653+
- Meaning
654+
* - ``oiio:ioproxy``
655+
- ptr
656+
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
657+
example by reading from memory rather than the file system.
658+
659+
**Configuration settings for HDR output**
660+
661+
When opening a HDR ImageOutput, the following special metadata tokens
662+
control aspects of the writing itself:
663+
664+
.. list-table::
665+
:widths: 30 10 65
666+
:header-rows: 1
667+
668+
* - Output configuration Attribute
669+
- Type
670+
- Meaning
671+
* - ``oiio:ioproxy``
672+
- ptr
673+
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
674+
example by writing to memory rather than the file system.
675+
676+
**Custom I/O Overrides**
677+
678+
HDR supports the "custom I/O" feature via the
679+
special ``"oiio:ioproxy"`` attributes (see Sections
680+
:ref:`sec-imageoutput-ioproxy` and :ref:`sec-imageinput-ioproxy`) as well as
681+
the `set_ioproxy()` methods.
641682

642683
|
643684

src/hdr.imageio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# SPDX-License-Identifier: BSD-3-Clause
33
# https://github.com/OpenImageIO/oiio
44

5-
add_oiio_plugin (rgbe.cpp hdrinput.cpp hdroutput.cpp)
5+
add_oiio_plugin (hdrinput.cpp hdroutput.cpp)

0 commit comments

Comments
 (0)