try exiv version fix for ubuntu
This commit is contained in:
parent
702214e20c
commit
1dc7b58212
7
main.cpp
7
main.cpp
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user