| 969 | |
| 970 | #ifdef EXV_ENABLE_FILESYSTEM |
| 971 | size_t PreviewImage::writeFile(const std::string& path) const { |
| 972 | std::string name = path + extension(); |
| 973 | // Todo: Creating a DataBuf here unnecessarily copies the memory |
| 974 | DataBuf buf(pData(), size()); |
| 975 | return Exiv2::writeFile(buf, name); |
| 976 | } |
| 977 | #endif |
| 978 | |
| 979 | DataBuf PreviewImage::copy() const { |