try exiv version fix for ubuntu
All checks were successful
Run Build / run-build-arch (push) Successful in 1m5s
Run Build / run-build-ubuntu (push) Successful in 55s

This commit is contained in:
Tanishq Dubey 2024-06-16 11:30:22 -04:00
parent 702214e20c
commit 1dc7b58212

View File

@ -8,6 +8,7 @@
#include "lib/imgui_internal.h"
#include <cstdint>
#include <exiv2/tags.hpp>
#include <exiv2/version.hpp>
#include <iostream>
#include <stdexcept>
#include <stdio.h>
@ -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;