From 1dc7b58212eab2b843da7fb22ae83ddd7888c67f Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Sun, 16 Jun 2024 11:30:22 -0400 Subject: [PATCH] try exiv version fix for ubuntu --- main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index c06d690..8b27282 100644 --- a/main.cpp +++ b/main.cpp @@ -8,6 +8,7 @@ #include "lib/imgui_internal.h" #include #include +#include #include #include #include @@ -39,6 +40,8 @@ #include "lib/histogram.h" + + struct Args : public argparse::Args { std::string &fpath = arg("path to the image"); }; @@ -83,7 +86,11 @@ EXIFData printExifData(const std::string& imagePath) { d.CameraMake = "NULL"; try { // Load the image + #if EXIV2_TEST_VERSION(0,28,0) Exiv2::Image::UniquePtr img = Exiv2::ImageFactory::open(imagePath); + #else + Exiv2::Image::AutoPtr img = Exiv2::ImageFactory::open(imagePath); + #endif if (img.get() == 0) { std::cerr << "Error: Could not open image file " << imagePath << std::endl; return d;