From 078b4e08fe3bccb7424dac76e158bf8bf48a182d Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Fri, 27 Jun 2025 17:58:36 +1200 Subject: feat: Made it so that you can now convert between image subclasses Also added the bitmap image subclass note: this is pretty hacky in how it works --- test/main.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/main.cpp b/test/main.cpp index f60017e..c020526 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -10,15 +11,19 @@ using std::cout, std::endl; int main(int argc, char* argv[]) { - if(argc < 2) + if(argc < 3) { - cout << "usage: " << argv[0] << " " << endl; + cout << "usage: " << argv[0] << " " << endl; return 1; } - std::string filename = argv[1]; - - PNGImage image(filename); + std::string infile = argv[1]; + std::string outfile = argv[2]; + - while(image.readNextChunk()){} + PNGImage png; + png.readFromFile(infile); + + BMPImage bmp(png); + bmp.writeToFile(outfile); } -- cgit v1.2.3