RE: Empty elements in a rdf:Seq » crash.cc
| 1 |
// g++ -W -Wall -g `pkg-config --cflags --libs exiv2` -o crash crash.cc
|
|---|---|
| 2 |
#include <exiv2/easyaccess.hpp>
|
| 3 |
#include <exiv2/xmp.hpp>
|
| 4 |
#include <exiv2/error.hpp>
|
| 5 |
#include <exiv2/image.hpp>
|
| 6 |
#include <exiv2/exif.hpp>
|
| 7 |
|
| 8 |
#include <stdio.h>
|
| 9 |
|
| 10 |
int main() |
| 11 |
{
|
| 12 |
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open("crash.xmp"); |
| 13 |
if(image.get() == 0) return 0; |
| 14 |
|
| 15 |
image->readMetadata(); |
| 16 |
|
| 17 |
Exiv2::XmpData &xmpData = image->xmpData(); |
| 18 |
Exiv2::XmpData::const_iterator pos = xmpData.findKey(Exiv2::XmpKey("Xmp.darktable.multi_name")); |
| 19 |
if(pos != xmpData.end()) |
| 20 |
printf("found %ld entries, should be 4\nelement 3: `%s'\n", pos->count(), pos->toString(3).c_str()); |
| 21 |
else
|
| 22 |
printf("not found\n"); |
| 23 |
return 1; |
| 24 |
}
|
- « Previous
- 1
- 2
- Next »