HighMap library (C++)
Loading...
Searching...
No Matches
openexr_writer.hpp
Go to the documentation of this file.
1/* Copyright (c) 2026 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
12#pragma once
13
14#include <memory>
15#include <mutex>
16#include <string>
17#include <vector>
18
20
21namespace hmap
22{
23
25{
26public:
28 explicit OpenEXRWriter(const std::string &filepath,
30 ~OpenEXRWriter() override;
31
32 // --- Lifecycle
33
34 bool open(const std::string &filepath,
35 const ImageWriterConfig &config) override;
36 void close() override;
37 bool is_open() const override;
38
39 // --- Chunk / tile writing
40
41 bool write_chunk(int offset_x, int offset_y, const Array &data) override;
42 bool write_chunk(int offset_x,
43 int offset_y,
44 const std::vector<Array> &channels) override;
45 bool write_tile(const UvTile &region, const Array &data) override;
46 bool write_tile(const UvTile &region,
47 const std::vector<Array> &channels) override;
48
49 // --- Properties
50
51 const ImageWriterConfig &config() const override;
52 const std::string &filepath() const override;
53
54private:
55 struct Impl;
56 std::unique_ptr<Impl> p_impl;
57};
58
59} // namespace hmap
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Definition image_writer.hpp:53
void close() override
Definition openexr_writer.cpp:64
bool write_tile(const UvTile &region, const Array &data) override
Definition openexr_writer.cpp:285
const std::string & filepath() const override
Definition openexr_writer.cpp:80
~OpenEXRWriter() override
Definition openexr_writer.cpp:59
bool write_chunk(int offset_x, int offset_y, const Array &data) override
Definition openexr_writer.cpp:170
bool open(const std::string &filepath, const ImageWriterConfig &config) override
Definition openexr_writer.cpp:90
OpenEXRWriter()
Definition openexr_writer.cpp:48
const ImageWriterConfig & config() const override
Definition openexr_writer.cpp:75
bool is_open() const override
Definition openexr_writer.cpp:85
Header file for generic image writer interface.
Definition opencv.hpp:20
Definition image_writer.hpp:37
Definition openexr_writer.cpp:36
Describes an Array tile's position within the normalized [0, 1]^2 UV domain and global index grid.
Definition uv_tile.hpp:46