GraphicsMagick: Disable the graphical progress indication in X11...

GraphicsMagick Commits <[email protected]> Sat, 10 Aug 2024 16:35:06 -0500
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.11305.1723325715.7812.graphicsmagick-commit@lists.sourceforge.net>
changeset 314108fbb930 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=314108fbb930
summary: Disable the graphical progress indication in X11 animate and display apps by default.

diffstat:

 ChangeLog                              |  12 ++++++++++++
 VisualMagick/installer/inc/version.isx |   4 ++--
 magick/animate.c                       |  11 +++++++++--
 magick/display.c                       |   7 ++++++-
 magick/image.c                         |   6 +++---
 magick/image.h                         |   2 +-
 magick/version.h                       |   4 ++--
 magick/widget.c                        |   3 +++
 magick/xwindow.h                       |   5 +++++
 www/ChangeLog.html                     |  14 ++++++++++++++
 10 files changed, 57 insertions(+), 11 deletions(-)

diffs (182 lines):

diff -r 8a5bcec62c1f -r 314108fbb930 ChangeLog
--- a/ChangeLog	Wed Aug 07 17:02:19 2024 -0500
+++ b/ChangeLog	Sat Aug 10 16:20:29 2024 -0500
@@ -1,3 +1,15 @@
+2024-08-10  Bob Friesenhahn  <[email protected]>
+
+	* magick/image.c (GetImageInfo): Change the default for ImageInfo
+	'progress' to False.  This parameter is used by 'animate' and
+	'display'.  It was discovered that under Ubuntu 22.04 LTS, the
+	progress indication in 'animate' and 'display' has changed from
+	almost no cost, to taking vastly more time than the work to be
+	performed!  As a result, there will be no graphical progress
+	indication in the X11 commands unless this resource is set to
+	True.  ImageMagick had already removed this progress indication.
+	The -monitor option will cause progress output to stderr.
+
 2024-08-07  Bob Friesenhahn  <[email protected]>
 
 	* www/docutils-articles.css: reStructuredText style sheet
diff -r 8a5bcec62c1f -r 314108fbb930 VisualMagick/installer/inc/version.isx
--- a/VisualMagick/installer/inc/version.isx	Wed Aug 07 17:02:19 2024 -0500
+++ b/VisualMagick/installer/inc/version.isx	Sat Aug 10 16:20:29 2024 -0500
@@ -10,5 +10,5 @@
 
 #define public MagickPackageName "GraphicsMagick"
 #define public MagickPackageVersion "1.4"
-#define public MagickPackageVersionAddendum ".020240807"
-#define public MagickPackageReleaseDate "snapshot-20240807"
+#define public MagickPackageVersionAddendum ".020240810"
+#define public MagickPackageReleaseDate "snapshot-20240810"
diff -r 8a5bcec62c1f -r 314108fbb930 magick/animate.c
--- a/magick/animate.c	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/animate.c	Sat Aug 10 16:20:29 2024 -0500
@@ -1264,7 +1264,11 @@
           (chdir(working_directory) != 0))
         MagickFatalError(ConfigureFatalError,UnableToRestoreCurrentDirectory,
                          NULL);
-      monitor_handler=SetMonitorHandler(MagickXMagickMonitor);
+#if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR
+      if ((resource_info->image_info->progress) &&
+          (monitor_handler == (MonitorHandler) NULL))
+        monitor_handler=SetMonitorHandler(MagickXMagickMonitor);
+#endif /* if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR */
       warning_handler=resource_info->display_warnings ?
         SetErrorHandler(MagickXWarning) : SetErrorHandler((ErrorHandler) NULL);
       warning_handler=resource_info->display_warnings ?
@@ -1768,8 +1772,11 @@
   /*
     Set out progress and warning handlers.
   */
-  if (monitor_handler == (MonitorHandler) NULL)
+#if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR
+  if ((resource_info->image_info->progress)/*  && */
+      /* (monitor_handler == (MonitorHandler) NULL) */)
     monitor_handler=SetMonitorHandler(MagickXMagickMonitor);
+#endif /* if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR */
   if (warning_handler == (WarningHandler) NULL)
     {
       warning_handler=resource_info->display_warnings ?
diff -r 8a5bcec62c1f -r 314108fbb930 magick/display.c
--- a/magick/display.c	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/display.c	Sat Aug 10 16:20:29 2024 -0500
@@ -13858,8 +13858,11 @@
       /*
         Set the progress monitor if progress monitoring is requested.
       */
-      if (resource_info->image_info->progress)
+#if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR
+      if ((resource_info->image_info->progress) /* && */
+          /* (monitor_handler == (MonitorHandler) NULL) */)
         monitor_handler=SetMonitorHandler(MagickXMagickMonitor);
+#endif /* if defined(MAGICK_USE_XMAGICK_MONITOR) && MAGICK_USE_XMAGICK_MONITOR */
       /*
         Set the warning and signal handlers.
       */
@@ -14367,9 +14370,11 @@
   /*
     Set progress monitor if progress monitoring requested.
   */
+#if defined(MAGICK_USE_XMAGICK_MONITOR)
   if ((resource_info->image_info->progress) &&
       (monitor_handler == (MonitorHandler) NULL))
     monitor_handler=SetMonitorHandler(MagickXMagickMonitor);
+#endif /* if defined(MAGICK_USE_XMAGICK_MONITOR) */
   /*
     Set warning and signal handlers.
   */
diff -r 8a5bcec62c1f -r 314108fbb930 magick/image.c
--- a/magick/image.c	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/image.c	Sat Aug 10 16:20:29 2024 -0500
@@ -1936,10 +1936,10 @@
   image_info->depth=QuantumDepth;
   image_info->interlace=UndefinedInterlace;
   image_info->quality=DefaultCompressionQuality;
-  image_info->antialias=True;
+  image_info->antialias=MagickTrue;
   image_info->pointsize=12;
-  image_info->dither=True;
-  image_info->progress=True;
+  image_info->dither=MagickTrue;
+  image_info->progress=MagickFalse;
   GetExceptionInfo(&exception);
   BackgroundColorInit(&image_info->background_color);
   BorderColorInit(&image_info->border_color);
diff -r 8a5bcec62c1f -r 314108fbb930 magick/image.h
--- a/magick/image.h	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/image.h	Sat Aug 10 16:20:29 2024 -0500
@@ -942,7 +942,7 @@
   MagickBool
     dither,                  /* If true, dither image while writing */
     monochrome,              /* If true, use monochrome format */
-    progress;                /* If true, show progress indication */
+    progress;                /* If true, show progress indication (for X11 commands) */
 
   ColorspaceType
     colorspace;              /* Colorspace representations of image pixels */
diff -r 8a5bcec62c1f -r 314108fbb930 magick/version.h
--- a/magick/version.h	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/version.h	Sat Aug 10 16:20:29 2024 -0500
@@ -38,8 +38,8 @@
 #define MagickLibVersion  0x282500
 #define MagickLibVersionText  "1.4"
 #define MagickLibVersionNumber 28,25,0
-#define MagickChangeDate   "20240807"
-#define MagickReleaseDate  "snapshot-20240807"
+#define MagickChangeDate   "20240810"
+#define MagickReleaseDate  "snapshot-20240810"
 
 /*
   The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines
diff -r 8a5bcec62c1f -r 314108fbb930 magick/widget.c
--- a/magick/widget.c	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/widget.c	Sat Aug 10 16:20:29 2024 -0500
@@ -8048,6 +8048,9 @@
       MagickXInfoWidget(display,windows,monitor_info.text);
   /*
     Draw progress monitor bar to represent percent completion of a task.
+
+    FIXME: Under Ubuntu 22.04 LTS this has become a thousand times
+    slower so that the progress monitor takes most of the time!
   */
   if (!windows->info.mapped || (task != monitor_info.text))
     MagickXInfoWidget(display,windows,task);
diff -r 8a5bcec62c1f -r 314108fbb930 magick/xwindow.h
--- a/magick/xwindow.h	Wed Aug 07 17:02:19 2024 -0500
+++ b/magick/xwindow.h	Sat Aug 10 16:20:29 2024 -0500
@@ -65,6 +65,11 @@
 #define MaxXWindows  10
 
 /*
+  Set to true to use MagickXMagickMonitor()
+*/
+#define MAGICK_USE_XMAGICK_MONITOR 1
+
+/*
   Enumeration declarations.
 */
 typedef enum
diff -r 8a5bcec62c1f -r 314108fbb930 www/ChangeLog.html
--- a/www/ChangeLog.html	Wed Aug 07 17:02:19 2024 -0500
+++ b/www/ChangeLog.html	Sat Aug 10 16:20:29 2024 -0500
@@ -38,6 +38,20 @@
 
 <main id="graphicsmagick-changelog">
 <h1 class="title">GraphicsMagick ChangeLog</h1>
+<p>2024-08-10  Bob Friesenhahn  &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
+<blockquote>
+<ul class="simple">
+<li><p>magick/image.c (GetImageInfo): Change the default for ImageInfo
+'progress' to False.  This parameter is used by 'animate' and
+'display'.  It was discovered that under Ubuntu 22.04 LTS, the
+progress indication in 'animate' and 'display' has changed from
+almost no cost, to taking vastly more time than the work to be
+performed!  As a result, there will be no graphical progress
+indication in the X11 commands unless this resource is set to
+True.  ImageMagick had already removed this progress indication.
+The -monitor option will cause progress output to stderr.</p></li>
+</ul>
+</blockquote>
 <p>2024-08-07  Bob Friesenhahn  &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
 <blockquote>
 <ul class="simple">