Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::ExrFileWriter Class Reference

#include <ExrFileWriter.h>

Public Member Functions

 ExrFileWriter ()
 Create default writer with limited functionalities. Constructed without a path, the file writer may have limited functionalities in operations related to the filesystem.
 
 ExrFileWriter (const Path &filePath)
 
void save (const HdrRgbFrame &frame)
 
void saveHighPrecision (const HdrRgbFrame &frame)
 
void saveToFilesystem (const HdrRgbFrame &frame, bool saveInHighPrecision=false, std::string_view redChannelName="R", std::string_view greenChannelName="G", std::string_view blueChannelName="B", std::string_view alphaChannelName="", HdrComponent alphaValue=1)
 Save an EXR file to the filesystem. A channel will be ignored (not saved) if its name is empty.
 
void saveToMemory (const HdrRgbFrame &frame, ByteBuffer &buffer, std::string_view redChannelName="R", std::string_view greenChannelName="G", std::string_view blueChannelName="B", std::string_view alphaChannelName="", HdrComponent alphaValue=1)
 Save an EXR file to memory instead of filesystem. A channel will be ignored (not saved) if its name is empty. Saving to memory does not offer precision options. Precision of the saved data is automatically determined for best performance when saving to memory.
 

Constructor & Destructor Documentation

◆ ExrFileWriter() [1/2]

ph::ExrFileWriter::ExrFileWriter ( )

Create default writer with limited functionalities. Constructed without a path, the file writer may have limited functionalities in operations related to the filesystem.

◆ ExrFileWriter() [2/2]

ph::ExrFileWriter::ExrFileWriter ( const Path & filePath)
explicit

Member Function Documentation

◆ save()

void ph::ExrFileWriter::save ( const HdrRgbFrame & frame)

◆ saveHighPrecision()

void ph::ExrFileWriter::saveHighPrecision ( const HdrRgbFrame & frame)

◆ saveToFilesystem()

void ph::ExrFileWriter::saveToFilesystem ( const HdrRgbFrame & frame,
bool saveInHighPrecision = false,
std::string_view redChannelName = "R",
std::string_view greenChannelName = "G",
std::string_view blueChannelName = "B",
std::string_view alphaChannelName = "",
HdrComponent alphaValue = 1 )

Save an EXR file to the filesystem. A channel will be ignored (not saved) if its name is empty.

◆ saveToMemory()

void ph::ExrFileWriter::saveToMemory ( const HdrRgbFrame & frame,
ByteBuffer & buffer,
std::string_view redChannelName = "R",
std::string_view greenChannelName = "G",
std::string_view blueChannelName = "B",
std::string_view alphaChannelName = "",
HdrComponent alphaValue = 1 )

Save an EXR file to memory instead of filesystem. A channel will be ignored (not saved) if its name is empty. Saving to memory does not offer precision options. Precision of the saved data is automatically determined for best performance when saving to memory.


The documentation for this class was generated from the following files: