# HG changeset patch # User Sebastien Jodogne # Date 1711750981 -3600 # Node ID dcbf0c7769454fa8854f45ddcb88a72d87fb591c # Parent ca8442691f1695d7e4a7882a377f5d1b62811418 fix jpeg diff -r ca8442691f16 -r dcbf0c776945 OrthancFramework/Sources/Images/JpegWriter.cpp --- a/OrthancFramework/Sources/Images/JpegWriter.cpp Fri Mar 29 21:53:41 2024 +0100 +++ b/OrthancFramework/Sources/Images/JpegWriter.cpp Fri Mar 29 23:23:01 2024 +0100 @@ -177,7 +177,17 @@ Internals::JpegErrorManager jerr; unsigned char* data = NULL; - unsigned long size; // jpeg_mem_dest() uses "unsigned long*" instead of "size_t*" + +#if ((JPEG_LIB_VERSION_MAJOR < 9) || \ + (JPEG_LIB_VERSION_MAJOR == 9 && JPEG_LIB_VERSION_MINOR <= 3)) + /** + * jpeg_mem_dest() has "unsigned long*" as its 3rd parameter until + * jpeg-9c. Since jpeg-9d, this is a "size_t*". + **/ + unsigned long size; +#else + size_t size; +#endif if (setjmp(jerr.GetJumpBuffer())) {