diff options
| author | Dylan <boss@tehbox.org> | 2026-05-06 15:55:59 +1200 |
|---|---|---|
| committer | Dylan <boss@tehbox.org> | 2026-05-06 15:55:59 +1200 |
| commit | 85cd1ecf29c3a295536ccc3782c2415d7518aef0 (patch) | |
| tree | 2725c2b022a081e57e9dca90ef1fb309ff379337 /test | |
| parent | 4d5d07beeef8ae4b7daf602bf66216ed8ff81442 (diff) | |
| download | tehimage-PNG-writing.tar.gz tehimage-PNG-writing.zip | |
feat: Implemented PNG image writingPNG-writing
It finally works now
Definitely some clean up to be done
Diffstat (limited to 'test')
| -rw-r--r-- | test/main.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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] << " <in file> <out file>" << endl; + cout << "usage: " << argv[0] << " <in file> <tmpfile> <outfile>" << 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); } |
