12#include <Common/primitive_type.h>
18namespace ph {
class Path; }
19namespace ph {
class RegularPicture; }
20namespace ph {
class RegularPictureFormat; }
21namespace ph {
class PictureMeta; }
22namespace ph {
class ByteBuffer; }
58RegularPicture
load_picture(
const Path& picturePath, std::size_t layerIdx = 0);
69 const Path& picturePath,
70 PictureMeta* out_meta,
72 std::size_t* out_numChannels =
nullptr);
77void save(
const LdrRgbFrame& frame,
const Path& filePath,
const PictureMeta* meta =
nullptr);
82void save(
const HdrRgbFrame& frame,
const Path& filePath,
const PictureMeta* meta =
nullptr);
92 const Path& fileDirectory,
93 const std::string& name,
95 const PictureMeta* meta =
nullptr);
105 const Path& fileDirectory,
106 const std::string& name,
108 const PictureMeta* meta =
nullptr);
144void save_exr(
const HdrRgbFrame& frame, ByteBuffer& buffer,
const PictureMeta* meta =
nullptr);
bool init_picture_IO()
Definition io_utils.cpp:33
Helpers for data I/O.
Definition io_utils.cpp:26
bool has_LDR_support(const std::string_view filenameExt)
Checks whether the provided picture format supports LDR by filename extension.
Definition io_utils.cpp:401
RegularPicture load_LDR_picture(const Path &picturePath, std::size_t layerIdx)
Definition io_utils.cpp:296
void save_tga(const LdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in TGA format.
Definition io_utils.cpp:651
std::string load_text(const Path &filePath)
Read the whole file as a formatted string.
Definition io_utils.cpp:242
void save_hdr(const HdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in HDR format.
Definition io_utils.cpp:672
void save(const LdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a LDR frame to the specified file. Similar to save(4), except file name and format are deduced ...
Definition io_utils.cpp:473
void save_pfm(const HdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in PFM format.
Definition io_utils.cpp:711
void save_png(const LdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in PNG format.
Definition io_utils.cpp:583
void save_exr(const HdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in EXR format.
Definition io_utils.cpp:693
void save_bmp(const LdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in BMP format.
Definition io_utils.cpp:630
RegularPicture load_HDR_picture(const Path &picturePath, std::size_t layerIdx)
Definition io_utils.cpp:319
void save_jpg(const LdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in JPG format.
Definition io_utils.cpp:605
RegularPicture load_picture(const Path &picturePath, std::size_t layerIdx)
Loads common picture types from file. Format is deduced from filename extension. Tries to load the sp...
Definition io_utils.cpp:257
void save_exr_high_precision(const HdrRgbFrame &frame, const Path &filePath, const PictureMeta *meta)
Saves a frame in EXR format with high precision encoding.
Definition io_utils.cpp:702
bool has_HDR_support(const std::string_view filenameExt)
Checks whether the provided picture format supports HDR by filename extension.
Definition io_utils.cpp:415
bool load_picture_meta(const Path &picturePath, PictureMeta *out_meta, math::Vector2S *out_sizePx, std::size_t *out_numChannels)
Load general information that describes the picture. For most formats, this parses the image header w...
Definition io_utils.cpp:425
TVector2< std::size_t > Vector2S
Definition math_fwd.h:48
The root for all renderer implementations.
Definition EEngineProject.h:6
TFrame< HdrComponent, 3 > HdrRgbFrame
Definition frame_fwd.h:17
TFrame< LdrComponent, 3 > LdrRgbFrame
Definition frame_fwd.h:16
EPictureFile
Definition EPictureFile.h:9