summaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-02-21 07:27:00 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-02-21 07:27:00 +0100
commitd12498504c279a0a85bbfb024f7903e34dbe07db (patch)
tree0df9f3f8bf27470ac211a57bb8e44be0aa2f6138 /src/image.h
parent27637ab117d8738236f6ab155300ff6e79e4843b (diff)
broken img calc; change dir struct
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/image.h b/src/image.h
index 934aa40..b4e8a58 100644
--- a/src/image.h
+++ b/src/image.h
@@ -3,6 +3,8 @@
#include "constants.h"
#include "typedefs.h"
+#define USER_PTR
+
class Pixels;
// TODO: template
@@ -10,8 +12,20 @@ struct Image
{
int width{0};
int height{0};
- uint8_t data[img_height][img_width] = {{0}};
- uint8_t rotated_cw[img_width][img_height] = {{0}};
+ // uint8_t data[img_height][img_width] = {{0}};
+
+ using row_t = std::array<uint8_t, img_width>;
+ using data_t = std::array<row_t, img_height>;
+ using rotated_row_t = std::array<uint8_t, img_height>;
+ using column_t = rotated_row_t;
+ using rotated_data_t = std::array<column_t, img_width>;
+ // data_t d;
+ data_t data;
+ // data_t *data;
+ // uint8_t *data = {nullptr};
+ // uint8_t &dataAt(size_t row, size_t col);
+ // uint8_t rotated_cw[img_width][img_height] = {{0}};
+ rotated_data_t rotated_cw;
// size_t dataSize{0};
// unsigned int stride{0};
libcamera::PixelFormat pixelFormat{0};