summaryrefslogtreecommitdiff
path: root/graphics/asymptote/EXRFiles.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-12-28 03:01:00 +0000
committerNorbert Preining <norbert@preining.info>2021-12-28 03:01:00 +0000
commitecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch)
tree13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/EXRFiles.h
parent790995b7e79697514364450bf9c04f1b8d500838 (diff)
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/EXRFiles.h')
-rw-r--r--graphics/asymptote/EXRFiles.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/graphics/asymptote/EXRFiles.h b/graphics/asymptote/EXRFiles.h
new file mode 100644
index 0000000000..36bd8b9b57
--- /dev/null
+++ b/graphics/asymptote/EXRFiles.h
@@ -0,0 +1,32 @@
+//
+// Created by jamie on 8/23/21.
+//
+
+#pragma once
+#include "common.h"
+#include "cudareflect/tinyexr/tinyexr.h"
+
+namespace camp
+{
+class IEXRFile
+{
+public:
+ IEXRFile(string const& file);
+ ~IEXRFile();
+
+ [[nodiscard]]
+ float const* getData() const {
+ return data;
+ }
+
+ [[nodiscard]]
+ std::pair<int,int> size() const {
+ return std::make_pair(width, height);
+ }
+
+private:
+ float* data=nullptr;
+ int width=0, height=0;
+};
+
+} // namespace gl;