diff options
author | dan <[email protected]> | 2024-04-28 12:13:16 -0400 |
---|---|---|
committer | dan <[email protected]> | 2024-04-28 12:13:16 -0400 |
commit | 43258a695765374968540f22319e8cd62da45297 (patch) | |
tree | 7e47935f024a33dc2d4a128903c97c8e7f97d9d8 | |
parent | 18ae691429af89d9949d6e30650d70e3ab4239cb (diff) | |
download | 54-43258a695765374968540f22319e8cd62da45297.tar.gz 54-43258a695765374968540f22319e8cd62da45297.tar.bz2 54-43258a695765374968540f22319e8cd62da45297.zip |
fix: update exiv2 wrapper
-rw-r--r-- | lib/exif_wrapper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/exif_wrapper.cpp b/lib/exif_wrapper.cpp index c4088ef..d7ba4d2 100644 --- a/lib/exif_wrapper.cpp +++ b/lib/exif_wrapper.cpp @@ -4,6 +4,7 @@ #include <exiv2/image.hpp> #include <memory> #include <string> +#include <iostream> #include <unistd.h> @@ -16,7 +17,7 @@ extern "C" unsigned int getExifOrientation(uint8_t* imgBytes, unsigned int size) ::atexit(Exiv2::XmpParser::terminate); Exiv2::enableBMFF(); - Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(imgBytes, size); + Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(imgBytes, size); assert(image.get() != 0); image->readMetadata(); @@ -25,7 +26,7 @@ extern "C" unsigned int getExifOrientation(uint8_t* imgBytes, unsigned int size) return 9; } - return (unsigned int) exifData[ORIENTATION_KEY].toLong(); + return (unsigned int) exifData[ORIENTATION_KEY].toUint32(); } //catch (std::exception& e) { //catch (Exiv2::AnyError& e) { |