blob: 609522068d638ae47e465a64c92dd1b8fca77e16 (
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
|
#pragma once
#include <array>
#include "fuck_intel.h"
#include <QString>
#include "typedefs.h"
struct Pixels
{
Counters counters{};
std::array<float, img_width> pixels{0.f};
Pixels& operator+=(const Pixels& other);
Pixels& operator/=(const float divider);
// TODO: tests for everything everywhere
/*!
* \brief load - load binary pixels from file
* \param filename - file path
* \return Pixels on success, empty std::optional otherwise
*/
[[nodiscard]] static std::optional<Pixels> load(const QString& filename);
/*!
* \brief save - save binary profile to file
* \param filename - file path
* \return - true on success, false otherwise
*/
[[nodiscard]] bool save(const QString& filename);
};
|