GraphicsMagick: rwfile.c, rwblob.c: Print reproducible test info...

GraphicsMagick Commits <[email protected]> Mon, 13 Nov 2023 10:09:10 -0600
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.1928.1699891762.1408.graphicsmagick-commit@lists.sourceforge.net>
changeset afe749bebed9 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=afe749bebed9
summary: rwfile.c, rwblob.c: Print reproducible test information.

diffstat:

 ChangeLog          |   9 +++++++--
 magick/utility.c   |   1 +
 tests/rwblob.c     |  29 +++++++++++++++++++++++++++--
 tests/rwfile.c     |  27 ++++++++++++++++++++++++++-
 www/Changelog.html |   7 +++++++
 5 files changed, 68 insertions(+), 5 deletions(-)

diffs (150 lines):

diff -r 8f72b25fe48e -r afe749bebed9 ChangeLog
--- a/ChangeLog	Sun Nov 12 18:50:45 2023 -0600
+++ b/ChangeLog	Mon Nov 13 10:09:05 2023 -0600
@@ -1,7 +1,12 @@
+2023-11-13  Bob Friesenhahn  <[email protected]>
+
+	* tests/rwfile.c, tests/rwblob.c: Print reproducible test
+	information.
+
 2023-11-13  Fojtik Jaroslav  <[email protected]>
 
-	* VisualMagick/tests/runtest.bat Sumate and display total amount 
-        of problems during testing.
+	* VisualMagick/tests/runtest.bat Sumate and display total amount
+	of problems during testing.
 
 2023-11-12  Bob Friesenhahn  <[email protected]>
 
diff -r 8f72b25fe48e -r afe749bebed9 magick/utility.c
--- a/magick/utility.c	Sun Nov 12 18:50:45 2023 -0600
+++ b/magick/utility.c	Mon Nov 13 10:09:05 2023 -0600
@@ -6811,6 +6811,7 @@
       }
       case '#':
       {
+        /* If 'ping' mode was used, then there may be no pixel cache! */
         if (GetPixelCachePresent(image))
           {
             (void) SignatureImage(image);
diff -r 8f72b25fe48e -r afe749bebed9 tests/rwblob.c
--- a/tests/rwblob.c	Sun Nov 12 18:50:45 2023 -0600
+++ b/tests/rwblob.c	Mon Nov 13 10:09:05 2023 -0600
@@ -26,6 +26,27 @@
 #include <string.h>
 #include <locale.h>
 
+static void DescribeFrames(const ImageInfo *image_info, Image *list)
+{
+  /* [0] AVS 70x46+072 Grayscale 8-bit adea7b1989cc5d19794a25ae3d7d0bc86f83b014f7231a869ee7b97177d54ab5 */
+  static const char descr_fmt[] = "[%s] %m %wx%h%X%y %r %q-bit %#";
+  Image *list_entry = list;
+
+  while (list_entry != (Image *) NULL)
+    {
+      char
+        *text;
+
+      text=TranslateText(image_info,list_entry,descr_fmt);
+      if (text != (char *) NULL)
+        {
+          fprintf(stdout,"%s\n", text);
+          MagickFree(text);
+        }
+      list_entry=GetNextImageInList(list_entry);
+    }
+}
+
 int main ( int argc, char **argv )
 {
   Image
@@ -336,8 +357,8 @@
     else
       {
         /* Print a short description of the image to stdout */
-        DescribeImage( ping_image, stdout, MagickFalse );
-        (void) fflush(stdout);
+        /* DescribeFrames(imageInfo, ping_image); */
+        /* (void) fflush(stdout); */
         DestroyImageList( ping_image );
       }
     if (ping_error)
@@ -433,6 +454,10 @@
   MagickFree(blob);
   blob=0;
 
+  /* Print a short description of the image to stdout */
+  DescribeFrames(imageInfo, final);
+  (void) fflush(stdout);
+
   if (check)
     {
       /*
diff -r 8f72b25fe48e -r afe749bebed9 tests/rwfile.c
--- a/tests/rwfile.c	Sun Nov 12 18:50:45 2023 -0600
+++ b/tests/rwfile.c	Mon Nov 13 10:09:05 2023 -0600
@@ -26,6 +26,27 @@
 #include <string.h>
 #include <locale.h>
 
+static void DescribeFrames(const ImageInfo *image_info, Image *list)
+{
+  /* [0] AVS 70x46+072 Grayscale 8-bit adea7b1989cc5d19794a25ae3d7d0bc86f83b014f7231a869ee7b97177d54ab5 */
+  static const char descr_fmt[] = "[%s] %m %wx%h%X%y %r %q-bit %#";
+  Image *list_entry = list;
+
+  while (list_entry != (Image *) NULL)
+    {
+      char
+        *text;
+
+      text=TranslateText(image_info,list_entry,descr_fmt);
+      if (text != (char *) NULL)
+        {
+          fprintf(stdout,"%s\n", text);
+          MagickFree(text);
+        }
+      list_entry=GetNextImageInList(list_entry);
+    }
+}
+
 int main ( int argc, char **argv )
 {
   Image
@@ -400,7 +421,7 @@
     else
       {
         /* Print a short description of the image to stdout */
-        DescribeImage( ping_image, stdout, MagickFalse );
+        /* DescribeFrames(imageInfo, ping_image); */
         DestroyImageList( ping_image );
       }
     if (ping_error)
@@ -528,6 +549,10 @@
       goto program_exit;
     }
 
+  /* Print a short description of the image to stdout */
+  DescribeFrames(imageInfo, final);
+  (void) fflush(stdout);
+
   if (check)
     {
       /*
diff -r 8f72b25fe48e -r afe749bebed9 www/Changelog.html
--- a/www/Changelog.html	Sun Nov 12 18:50:45 2023 -0600
+++ b/www/Changelog.html	Mon Nov 13 10:09:05 2023 -0600
@@ -37,6 +37,13 @@
 </div>
 
 <div class="document">
+<p>2023-11-13  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>tests/rwfile.c, tests/rwblob.c: Print reproducible test
+information.</p></li>
+</ul>
+</blockquote>
 <p>2023-11-13  Fojtik Jaroslav  &lt;<a class="reference external" href="mailto:JaFojtik&#37;&#52;&#48;yandex&#46;com">JaFojtik<span>&#64;</span>yandex<span>&#46;</span>com</a>&gt;</p>
 <blockquote>
 <ul class="simple">