summaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/image.h b/src/image.h
index 33fb4d8..105711b 100644
--- a/src/image.h
+++ b/src/image.h
@@ -3,6 +3,7 @@
#include <QElapsedTimer>
#include "constants.h"
+#include "pixels.h"
#include "typedefs.h"
#define USER_PTR
@@ -29,6 +30,7 @@ struct Image
alignas(128) data_t data;
alignas(128) rotated_data_t rotated_cw;
+ std::optional<Pixels> pixels{};
uint16_t width{0};
uint16_t height{0};
@@ -40,9 +42,15 @@ struct Image
void rotate();
- std::shared_ptr<Pixels> sharedPixels();
+ // std::shared_ptr<Pixels> sharedPixels();
+ Pixels &getPixels();
void copyFromData(const void* src, size_t size);
+ /*!
+ * \brief reset - reset counters and invalidate pixels
+ */
+ void reset();
+
static void copy(data_t &dst, const radxa_data_t &src);
private: