changeset 322:3160d2b2beb9 default tip

fix build on recent versions of jsoncpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 29 Oct 2024 11:08:22 +0100
parents 705be6d59d9b
children
files Plugin/DecodedImageAdapter.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/DecodedImageAdapter.cpp	Tue Jun 11 12:57:30 2024 +0200
+++ b/Plugin/DecodedImageAdapter.cpp	Tue Oct 29 11:08:22 2024 +0100
@@ -357,7 +357,7 @@
     assert(converted.GetSize() == converted.GetWidth() * converted.GetHeight() * 
            GetBytesPerPixel(converted.GetFormat()));
     result["Orthanc"]["Compression"] = "Deflate";
-    result["sizeInBytes"] = converted.GetSize();
+    result["sizeInBytes"] = static_cast<Json::Value::UInt64>(converted.GetSize());
 
     std::string z;
     CompressUsingDeflate(z, GetGlobalContext(), converted.GetConstBuffer(), converted.GetSize());
@@ -482,7 +482,7 @@
     
     result["Orthanc"]["IsSigned"] = (accessor.GetFormat() == Orthanc::PixelFormat_SignedGrayscale16);
     result["Orthanc"]["Compression"] = "Jpeg";
-    result["sizeInBytes"] = converted.GetSize();
+    result["sizeInBytes"] = static_cast<Json::Value::UInt64>(converted.GetSize());
 
     std::string jpeg;
     WriteJpegToMemory(jpeg, GetGlobalContext(), converted, quality);