summaryrefslogtreecommitdiff
path: root/src/lib/j2k_image_proxy.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-07-24 23:18:24 +0200
committerCarl Hetherington <cth@carlh.net>2020-07-24 23:18:24 +0200
commita7cd9cec31952b932ab80fb50cddec28aab74736 (patch)
tree041018e7b337d9f9ceb7d1e651af0a0424b21f8b /src/lib/j2k_image_proxy.cc
parent73ebb92e9df01ba7afb97121b6e2cef6ca13a18e (diff)
Diffstat (limited to 'src/lib/j2k_image_proxy.cc')
-rw-r--r--src/lib/j2k_image_proxy.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc
index acf8bb052..29b50a577 100644
--- a/src/lib/j2k_image_proxy.cc
+++ b/src/lib/j2k_image_proxy.cc
@@ -108,7 +108,7 @@ J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
if (xml->optional_number_child<int> ("Eye")) {
_eye = static_cast<dcp::Eye> (xml->number_child<int> ("Eye"));
}
- _data = Data (xml->number_child<int> ("Size"));
+ _data = Data (xml->number_child<size_t>("Size"));
/* This only matters when we are using J2KImageProxy for the preview, which
will never use this constructor (which is only used for passing data to
encode servers). So we can put anything in here. It's a bit of a hack.
@@ -238,7 +238,7 @@ J2KImageProxy::memory_used () const
size_t m = _data.size();
if (_image) {
/* 3 components, 16-bits per pixel */
- m += 3 * 2 * _image->size().width * _image->size().height;
+ m += static_cast<size_t>(3 * 2 * _image->size().width * _image->size().height);
}
return m;
}