summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/EXRFiles.h
blob: 36bd8b9b5739db437614a07311881dfe96302bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;