micro improvements

This commit is contained in:
Kueffner, Maximilian
2025-05-23 15:15:01 +02:00
parent 436a61790c
commit 167dc1f9d4
7 changed files with 19 additions and 13 deletions
+5 -2
View File
@@ -1,15 +1,18 @@
#include "Image.hpp"
#include <filesystem>
#include <format>
#include <memory>
#include <opencv2/imgcodecs.hpp>
#include <stdexcept>
#include <string_view>
pixelarium::imaging::Image::Image(const std::string& uri)
{
if (!std::filesystem::exists(uri))
{
throw std::runtime_error("File not found");
throw std::runtime_error(std::format("File not {} found", uri));
}
this->_img = cv::imread(uri);
this->_img = std::make_unique<cv::Mat>(cv::imread(uri));
}