From 85cd1ecf29c3a295536ccc3782c2415d7518aef0 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 6 May 2026 15:55:59 +1200 Subject: feat: Implemented PNG image writing It finally works now Definitely some clean up to be done --- test/main.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/main.cpp b/test/main.cpp index 5a2525b..b7ae2ea 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -42,9 +42,9 @@ int main(int argc, char* argv[]) // return 0; - if(argc < 3) + if(argc < 4) { - cout << "usage: " << argv[0] << " " << endl; + cout << "usage: " << argv[0] << " " << endl; return 1; } @@ -83,18 +83,19 @@ int main(int argc, char* argv[]) // return 0; std::string infile = argv[1]; - std::string outfile = argv[2]; + std::string tmpfile = argv[2]; + std::string outfile = argv[3]; TehImage::BMPImage bmp; bmp.readFromFile(infile); TehImage::PNGImage png(bmp); - png.writeToFile(outfile); + png.writeToFile(tmpfile); - // TehImage::PNGImage png; - // png.readFromFile(infile); + TehImage::PNGImage png2; + png2.readFromFile(tmpfile); - // TehImage::BMPImage bmp(png); - // bmp.writeToFile(outfile); + TehImage::BMPImage bmp2(png2); + bmp.writeToFile(outfile); } -- cgit v1.2.3