Skip to content

Commit 797e4dc

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 5bf288b commit 797e4dc

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
@@ -597,6 +597,47 @@ preferred except when legacy file access is required.
597597
- the gamma correction specified in the RGBE header (if it's gamma corrected).
598598

599599

600+
**Configuration settings for HDR input**
601+
602+
When opening an HDR ImageInput with a *configuration* (see
603+
Section :ref:`sec-inputwithconfig`), the following special configuration
604+
options are supported:
605+
606+
.. list-table::
607+
:widths: 30 10 65
608+
:header-rows: 1
609+
610+
* - Input Configuration Attribute
611+
- Type
612+
- Meaning
613+
* - ``oiio:ioproxy``
614+
- ptr
615+
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
616+
example by reading from memory rather than the file system.
617+
618+
**Configuration settings for HDR output**
619+
620+
When opening a HDR ImageOutput, the following special metadata tokens
621+
control aspects of the writing itself:
622+
623+
.. list-table::
624+
:widths: 30 10 65
625+
:header-rows: 1
626+
627+
* - Output configuration Attribute
628+
- Type
629+
- Meaning
630+
* - ``oiio:ioproxy``
631+
- ptr
632+
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
633+
example by writing to memory rather than the file system.
634+
635+
**Custom I/O Overrides**
636+
637+
HDR supports the "custom I/O" feature via the
638+
special ``"oiio:ioproxy"`` attributes (see Sections
639+
:ref:`sec-imageoutput-ioproxy` and :ref:`sec-imageinput-ioproxy`) as well as
640+
the `set_ioproxy()` methods.
600641

601642
|
602643

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)