Skip to content

hdr overhaul, especially IOProxy support #3218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ if (PROJECT_IS_TOP_LEVEL)
"src/cineon.imageio/libcineon/*"
"src/dds.imageio/squish/*"
"src/gif.imageio/gif.h"
"src/hdr.imageio/rgbe.cpp"
"src/libutil/stb_sprintf.h"
CACHE STRING "Glob patterns to exclude for clang-format")
find_program (CLANG_FORMAT_EXE
Expand Down
4 changes: 4 additions & 0 deletions src/cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ macro (oiio_add_all_tests)
oiio_add_tests (gif
FOUNDVAR GIF_FOUND ENABLEVAR ENABLE_GIF
IMAGEDIR oiio-images URL "Recent checkout of oiio-images")
oiio_add_tests (hdr
ENABLEVAR ENABLE_HDR
IMAGEDIR openexr-images
URL http://github.com/AcademySoftwareFoundation/openexr-images)
oiio_add_tests (heif
FOUNDVAR Libheif_FOUND ENABLEVAR ENABLE_Libheif
URL https://github.com/nokiatech/heif/tree/gh-pages/content)
Expand Down
41 changes: 41 additions & 0 deletions src/doc/builtinplugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,47 @@ preferred except when legacy file access is required.
- the gamma correction specified in the RGBE header (if it's gamma corrected).


**Configuration settings for HDR input**

When opening an HDR ImageInput with a *configuration* (see
Section :ref:`sec-inputwithconfig`), the following special configuration
options are supported:

.. list-table::
:widths: 30 10 65
:header-rows: 1

* - Input Configuration Attribute
- Type
- Meaning
* - ``oiio:ioproxy``
- ptr
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
example by reading from memory rather than the file system.

**Configuration settings for HDR output**

When opening a HDR ImageOutput, the following special metadata tokens
control aspects of the writing itself:

.. list-table::
:widths: 30 10 65
:header-rows: 1

* - Output configuration Attribute
- Type
- Meaning
* - ``oiio:ioproxy``
- ptr
- Pointer to a ``Filesystem::IOProxy`` that will handle the I/O, for
example by writing to memory rather than the file system.

**Custom I/O Overrides**

HDR supports the "custom I/O" feature via the
special ``"oiio:ioproxy"`` attributes (see Sections
:ref:`sec-imageoutput-ioproxy` and :ref:`sec-imageinput-ioproxy`) as well as
the `set_ioproxy()` methods.

|

Expand Down
2 changes: 1 addition & 1 deletion src/hdr.imageio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/OpenImageIO/oiio

add_oiio_plugin (rgbe.cpp hdrinput.cpp hdroutput.cpp)
add_oiio_plugin (hdrinput.cpp hdroutput.cpp)
Loading