open an image with Exiv2

0

I'm trying to read some metadata from jpg-images with Exiv2. But unfortunately it fails at the beginning. I can't open an image.

That's my c++ code:

#include <exiv2/exiv2.hpp>

int main() {
    const char* path = "d:\test\IMG_0176.jpg";
    Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path);
}

Environment: MS Visual Studio 2019, Win10, 64 bit

That's the error message:

Exception at 0x00007FFB55151190 (vcruntime140.dll) in project.exe: 0xC0000005: access violation while reading at position 0x000001C5B78B1000

Has anybody an idea what's wrong? It's my first project with c++.

It's just a minimum example. Overall context is an opencv project where I need all images in a folder sorted by the date they were taken. That's why I want to read the metadata with Exiv2 to get the date, order the images and then read the images in correct order with opencv.

Thanks in advance for any help and advice!

c++
visual-studio
exiv2
asked on Stack Overflow Oct 17, 2020 by Carlos

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0