a8489292b6
* start some resource fiddling * start some resource fiddling * initiate a real resource manager * fix color flicker in rendering * delete unintended constructors and add a convenience function to reset the render-image (from the original image, aka. clone again) * [OpenGL deprecation warning] The compiler said that these functions are "deprecated". They seem to be useless anyway... * various improvements * add resource enumerator and documentation * fix constness stuff * use existing iterator for insertion * init unit tests * rm bogus file --------- Co-authored-by: m-aXimilian <keuffnermax@gmail.com>
18 lines
413 B
C++
18 lines
413 B
C++
#include "PixelariumImage.hpp"
|
|
|
|
#include <filesystem>
|
|
#include <format>
|
|
#include <memory>
|
|
#include <opencv2/imgcodecs.hpp>
|
|
#include <stdexcept>
|
|
|
|
pixelarium::imaging::PixelariumImage::PixelariumImage(const std::string& uri)
|
|
{
|
|
if (!std::filesystem::exists(uri))
|
|
{
|
|
throw std::runtime_error(std::format("File not {} found", uri));
|
|
}
|
|
|
|
this->img_ = std::make_unique<cv::Mat>(cv::imread(uri));
|
|
}
|