diff options
| author | Nikita Kostovsky <luntik2012@gmail.com> | 2025-01-23 13:41:27 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <luntik2012@gmail.com> | 2025-01-23 13:41:27 +0100 |
| commit | 80949709a1132b5198bb8006963f177fcde2e991 (patch) | |
| tree | 5d797ecfd761df3ac9968c696eba3abfd50852fa /src/image.cpp | |
| parent | 3fa8f19daf8b36b0703002d78a84e5bb7919849b (diff) | |
fix CMakeLists.txt, add some debug info and prototypes
Diffstat (limited to 'src/image.cpp')
| -rw-r--r-- | src/image.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/image.cpp b/src/image.cpp index ce814da..000ca2d 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -1,7 +1,11 @@ #include "image.h" +// #include <format> + #include <QElapsedTimer> +#include <libcamera/formats.h> + #include "macro.h" #include "pixels.h" @@ -125,3 +129,16 @@ std::shared_ptr<Pixels> Image::pixels() const return result; } + +void Image::copyFromData(const void *src, size_t size) +{ + if (size > sizeof(data)) + { + // throw std::logic_error(std::format) + } + + if (pixelFormat == libcamera::formats::R8) + { + memcpy(data, src, size); + } +} |
