From 0ff4fa6058b305476e7bc60c590acb6135c49b1c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 13 Apr 2018 23:23:00 +0100 Subject: Account for J2K decoding at lower-than-maximum resolution when cropping the resulting images; fixes #1274. --- src/lib/j2k_image_proxy.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/j2k_image_proxy.h') diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 3680de111..77d53a9e5 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -50,7 +50,7 @@ public: J2KImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); - boost::shared_ptr image ( + std::pair, int> image ( boost::optional note = boost::optional (), boost::optional size = boost::optional () ) const; @@ -59,7 +59,7 @@ public: void send_binary (boost::shared_ptr) const; /** @return true if our image is definitely the same as another, false if it is probably not */ bool same (boost::shared_ptr) const; - void prepare (boost::optional = boost::optional()) const; + int prepare (boost::optional = boost::optional()) const; AVPixelFormat pixel_format () const { return _pixel_format; } @@ -85,6 +85,7 @@ private: boost::optional _eye; mutable boost::shared_ptr _decompressed; mutable boost::optional _target_size; + mutable boost::optional _reduce; AVPixelFormat _pixel_format; mutable boost::mutex _mutex; boost::optional _forced_reduction; -- cgit v1.2.3