-class RawImageProxy : public ImageProxy
-{
-public:
- RawImageProxy (boost::shared_ptr<Image>);
- RawImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
-
- boost::shared_ptr<Image> image () const;
- void add_metadata (xmlpp::Node *) const;
- void send_binary (boost::shared_ptr<Socket>) const;
-
-private:
- boost::shared_ptr<Image> _image;
-};
-
-class MagickImageProxy : public ImageProxy
-{
-public:
- MagickImageProxy (boost::filesystem::path);
- MagickImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
+ /** @param note Handler for any notes that occur.
+ * @param size Size that the returned image will be scaled to, in case this
+ * can be used as an optimisation.
+ * @return Image (which must be aligned) and log2 of any scaling down that has
+ * already been applied to the image; e.g. if the the image is already half the size
+ * of the original, the second part of the return value will be 1.
+ */
+ virtual 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 = 0;