Added Read method

This commit is contained in:
Leonetienne
2022-03-05 22:00:57 +01:00
parent 33932906c4
commit 808738ac2e
9 changed files with 277 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ project(BmpPP_exec)
set(CMAKE_CXX_STANDARD 17)
ADD_COMPILE_DEFINITIONS(_EULE_NO_INTRINSICS_)
ADD_COMPILE_DEFINITIONS(_BMPLIB_DEBUG_OUTPUT_)
INCLUDE_DIRECTORIES(../Src/Eule/)
INCLUDE_DIRECTORIES(../Src/)

View File

@@ -6,6 +6,7 @@ using namespace Leonetienne::BmpPP;
int main() {
/*
BMP bmp({800, 600}, Colormode::RGB);
for (int x = 0; x < 800; x++)
@@ -19,8 +20,19 @@ int main() {
);
}
if (!bmp.Write("test.bmp"))
std::cerr << "What the hell" << std::endl;
*/
BMP bmp;
if (!bmp.Read("test.bmp"))
std::cerr << "Failed to read" << std::endl;
std::cout << (bmp.GetColormode() == Colormode::RGB) << std::endl;
if (!bmp.Write("testwrite.bmp"))
std::cerr << "What the hell" << std::endl;
return 0;
}