Quell config-save warning when we're only trying to save history.
[dcpomatic.git] / src / lib / magick_image_proxy.h
index 1db45d73bf35b3b98b41a315e6c3c3b038e4ba12..62f3afa2e23e01cf37be424dffa2f8fd00a350f1 100644 (file)
 class MagickImageProxy : public ImageProxy
 {
 public:
-       MagickImageProxy (boost::filesystem::path);
+       explicit MagickImageProxy (boost::filesystem::path);
        MagickImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
 
-       boost::shared_ptr<Image> image (
+       std::pair<boost::shared_ptr<Image>, int> image (
                boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
                boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
                ) const;
@@ -42,6 +42,10 @@ public:
 
 private:
        Magick::Blob _blob;
+       /** Path of a file that this image came from, if applicable; stored so that
+           failed-decode errors can give more detail.
+       */
+       boost::optional<boost::filesystem::path> _path;
        mutable boost::shared_ptr<Image> _image;
        mutable boost::mutex _mutex;
 };