# HG changeset patch # User Alain Mazy # Date 1669989933 -3600 # Node ID 0a9d36187a9105ccb3722a0327433d9b834d2b40 # Parent c387ebeb67b5326c24b7e88110d0ab2fdbc52892# Parent a3c3f13368ea951c8d92c304e4ab3559d8f396b7 merge diff -r c387ebeb67b5 -r 0a9d36187a91 NEWS --- a/NEWS Fri Dec 02 15:05:00 2022 +0100 +++ b/NEWS Fri Dec 02 15:05:33 2022 +0100 @@ -25,7 +25,7 @@ * /modalities/.../store now accepts "CalledAet", "Host", "Port" to override the modality configuration from the configuration file for a specific operation. * /tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s -* Fix support for image/jpg mime type in /tools/create-dicom +* Tolerance for "image/jpg" MIME type instead of "image/jpeg" in /tools/create-dicom OrthancFramework (C++) diff -r c387ebeb67b5 -r 0a9d36187a91 OrthancFramework/Sources/Enumerations.cpp --- a/OrthancFramework/Sources/Enumerations.cpp Fri Dec 02 15:05:00 2022 +0100 +++ b/OrthancFramework/Sources/Enumerations.cpp Fri Dec 02 15:05:33 2022 +0100 @@ -1728,8 +1728,12 @@ target = MimeType_Dicom; return true; } - else if (source == MIME_JPEG || source == MIME_JPG) + else if (source == MIME_JPEG || + source == "image/jpg") { + // Note the tolerance for "image/jpg", which is *not* a standard MIME type + // https://groups.google.com/g/orthanc-users/c/Y5x37UFKiDg/m/1zI260KTAwAJ + // https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types target = MimeType_Jpeg; return true; } diff -r c387ebeb67b5 -r 0a9d36187a91 OrthancFramework/Sources/Enumerations.h --- a/OrthancFramework/Sources/Enumerations.h Fri Dec 02 15:05:00 2022 +0100 +++ b/OrthancFramework/Sources/Enumerations.h Fri Dec 02 15:05:33 2022 +0100 @@ -35,7 +35,6 @@ static const char* const MIME_BINARY = "application/octet-stream"; static const char* const MIME_JPEG = "image/jpeg"; - static const char* const MIME_JPG = "image/jpg"; static const char* const MIME_JSON = "application/json"; static const char* const MIME_JSON_UTF8 = "application/json; charset=utf-8"; static const char* const MIME_PDF = "application/pdf";