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 (boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> ()) const;
+ 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;
+
void add_metadata (xmlpp::Node *) const;
void send_binary (boost::shared_ptr<Socket>) const;
bool same (boost::shared_ptr<const ImageProxy> other) const;
AVPixelFormat pixel_format () const;
+ size_t memory_used () const;
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;
};