Misc Improvements (#7)
* get rid of optional<ptr> -> double indirection * more optional cleanup * fix * add more render pixel type options * towards different views * missing virtual declaration of ShowImage * fix runtime * init image view factory * fix build Render Image close button re-enable add readme init documentation use awesomeDoxygen ci build docs install doxygen id token permission add pages write permission
This commit is contained in:
committed by
Maximilian Kueffner
parent
0be064bb8e
commit
235d00192a
@@ -5,6 +5,27 @@
|
||||
#include "IPixelariumImage.hpp"
|
||||
namespace pixelarium::imaging
|
||||
{
|
||||
constexpr pixelarium::imaging::ImageFileType ExtensionToType(const std::string& extension)
|
||||
{
|
||||
std::string lower_ext{extension};
|
||||
std::ranges::transform(extension, lower_ext.begin(), [](const char c) -> char { return std::tolower(c); });
|
||||
|
||||
if (lower_ext == ".jpg" || lower_ext == ".jpeg")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::JPG;
|
||||
}
|
||||
if (lower_ext == ".png")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::PNG;
|
||||
}
|
||||
if (lower_ext == ".czi")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::CZI;
|
||||
}
|
||||
|
||||
return pixelarium::imaging::ImageFileType::UNKNOWN;
|
||||
}
|
||||
|
||||
class PixelariumImageFactory
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user