Bug #1147 » ro.cpp
1 |
// Demonstrates a problem with exiv2 0.25 that allows read-only files to be
|
---|---|
2 |
// overwritten
|
3 |
|
4 |
#include <iostream>
|
5 |
#include "exiv2/image.hpp"
|
6 |
#include "exiv2/exif.hpp"
|
7 |
|
8 |
int main(void) |
9 |
{
|
10 |
Exiv2::Image::AutoPtr Image; |
11 |
Image = Exiv2::ImageFactory::open("ro.jpg"); |
12 |
try { |
13 |
Image->writeMetadata(); |
14 |
} catch (Exiv2::Error e) { |
15 |
std::cout << e << "\n"; |
16 |
return 1; |
17 |
}
|
18 |
return 0; |
19 |
}
|