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 "lib/imgui_internal.h"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <exiv2/tags.hpp>
|
#include <exiv2/tags.hpp>
|
||||||
|
#include <exiv2/version.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -39,6 +40,8 @@
|
|||||||
|
|
||||||
#include "lib/histogram.h"
|
#include "lib/histogram.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct Args : public argparse::Args {
|
struct Args : public argparse::Args {
|
||||||
std::string &fpath = arg("path to the image");
|
std::string &fpath = arg("path to the image");
|
||||||
};
|
};
|
||||||
@ -83,7 +86,11 @@ EXIFData printExifData(const std::string& imagePath) {
|
|||||||
d.CameraMake = "NULL";
|
d.CameraMake = "NULL";
|
||||||
try {
|
try {
|
||||||
// Load the image
|
// Load the image
|
||||||
|
#if EXIV2_TEST_VERSION(0,28,0)
|
||||||
Exiv2::Image::UniquePtr img = Exiv2::ImageFactory::open(imagePath);
|
Exiv2::Image::UniquePtr img = Exiv2::ImageFactory::open(imagePath);
|
||||||
|
#else
|
||||||
|
Exiv2::Image::AutoPtr img = Exiv2::ImageFactory::open(imagePath);
|
||||||
|
#endif
|
||||||
if (img.get() == 0) {
|
if (img.get() == 0) {
|
||||||
std::cerr << "Error: Could not open image file " << imagePath << std::endl;
|
std::cerr << "Error: Could not open image file " << imagePath << std::endl;
|
||||||
return d;
|
return d;
|
||||||
|
Loading…
Reference in New Issue
Block a user