From da1588f4306116ef58bb9666c54e443caad40a1c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 16 Feb 2022 16:15:09 +0100 Subject: [PATCH] Do not attempt to display jpeg2000 images jp2 could be converted to jpg with "convert" from ImageMagick but that would require some process spawning and fallback if ImageMagick is not installed... --- client/src/proxgui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/proxgui.cpp b/client/src/proxgui.cpp index 37a11315d..c27c0e59b 100644 --- a/client/src/proxgui.cpp +++ b/client/src/proxgui.cpp @@ -68,12 +68,16 @@ extern "C" void RepaintGraphWindow(void) { // hook up picture viewer extern "C" void ShowPictureWindow(char *fn) { + // No support for jpeg2000 in Qt Image since a while... + // https://doc.qt.io/qt-5/qtimageformats-index.html + if(strlen(fn) > 4 && !strcmp(fn + strlen(fn) - 4, ".jp2")) + return; if (!gui) { // Show a notice if X11/XQuartz isn't available #if defined(__MACH__) && defined(__APPLE__) PrintAndLogEx(WARNING, "You appear to be on a MacOS device without XQuartz.\nYou may need to install XQuartz (https://www.xquartz.org/) to make the plot work."); #else - PrintAndLogEx(WARNING, "You appear to be on an environment without an X11 server or without DISPLAY environment variable set.\nPlot may not work until you resolve these issues."); + PrintAndLogEx(WARNING, "You appear to be on an environment without an X11 server or without DISPLAY environment variable set.\nPicture display may not work until you resolve these issues."); #endif return; }