From 19e7524809d457a681d28570a47b3b6998bfd511 Mon Sep 17 00:00:00 2001 From: murat Date: Sat, 31 Jan 2026 18:06:37 +0300 Subject: [PATCH] beautify terminal output --- main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 8f1c8bf..707bdb5 100644 --- a/main.cpp +++ b/main.cpp @@ -41,7 +41,6 @@ int main(int argc, char *argv[]) { } std::string imagefile = argv[1]; - cout << "File: " << imagefile << "\n"; if (!fs::is_regular_file(imagefile)) { std::cout << "File not found: " << imagefile << "\n"; @@ -58,11 +57,11 @@ int main(int argc, char *argv[]) { file.read(reinterpret_cast(header), 8); if (is_png(header)) { - cout << "PNG detected\n"; + cout << "PNG file detected!\n"; } else if (is_jpeg(header)) { - cout << "JPEG detected\n"; + cout << "JPEG file detected!\n"; } else { - cout << "Unkown format!\n"; + cout << "Unkown image file format!\n"; return 1; } @@ -77,14 +76,17 @@ int main(int argc, char *argv[]) { ); if (!data) { - cout << "Failed to load image\n"; + cout << "Failed to load image!\n"; return 1; } + + cout << "**********\n"; cout << "Loaded image:\n"; cout << "Width: " << width << "\n"; cout << "Height: " << height << "\n"; cout << "Channels: " << channels << "\n"; + cout << "**********\n"; std::vector samples;