summaryrefslogtreecommitdiff
path: root/src/subtitle_image.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-02 23:39:01 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-02 23:39:01 +0100
commit8259e2771f85c33c531a83fe1a78668f158208da (patch)
tree5f1f83a1a269c7ef5a889ae5c2727d2360315896 /src/subtitle_image.h
parentf2f2a2afc393dcaee747b97173d71a622d05d910 (diff)
Hopefully-correct PKL and AssetMap when using Interop PNG subtitles.
Diffstat (limited to 'src/subtitle_image.h')
-rw-r--r--src/subtitle_image.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/subtitle_image.h b/src/subtitle_image.h
index 062df56b..3c4b3fe8 100644
--- a/src/subtitle_image.h
+++ b/src/subtitle_image.h
@@ -82,17 +82,26 @@ public:
return _png_image;
}
- void set_png_image (Data d) {
- _png_image = d;
+ void set_png_image (Data png) {
+ _png_image = png;
}
+ void read_png_file (boost::filesystem::path file);
+ void write_png_file (boost::filesystem::path file) const;
+
std::string id () const {
return _id;
}
+ /** @return the most recent disk file used to read or write this asset, if there is one */
+ boost::optional<boost::filesystem::path> file () const {
+ return _file;
+ }
+
private:
Data _png_image;
std::string _id;
+ mutable boost::optional<boost::filesystem::path> _file;
};
bool operator== (SubtitleImage const & a, SubtitleImage const & b);