Photon Engine 2.0.0-beta
A physically based renderer.
|
IO functions and helpers for processing EXR files. More...
#include "Frame/frame_fwd.h"
#include "Common/ThirdParty/lib_openexr.h"
#include <array>
#include <string_view>
#include <string>
#include "DataIO/EXR/exr_io_common.ipp"
Go to the source code of this file.
Namespaces | |
namespace | ph |
The root for all renderer implementations. | |
IO functions and helpers for processing EXR files.
Also contains helpers for using ILM's OpenEXR library for processing EXR files. The basic idea is that we provide pixel data in TFrame
, then create Imf::Header
and map frame data using Imf::FrameBuffer
. Finally, pixel data is read/written to file using Imf::InputFile
/Imf::OutputFile
. If the element type in TFrame
does not match the precision we requested, then a conversion will be done (converting to a suitable TFrame
on the fly, which incurs additional memory allocation).
To simplify common usages, TFrame
is assumed to contain the full data window. If a display-window only TFrame
is desired, use adjust_frame_to_display_window()
.
Note that Imf::FrameBuffer
and Imf::Slice
do not own the specified data, they only reference it. The original pixel data (typically a TFrame
here) must be kept alive during the output process.