GraphicsMagick: coders/topol.c Display header contents when debu...

GraphicsMagick Commits <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.11401.1682870400.1789.graphicsmagick-commit@lists.sourceforge.net>
changeset 137bb560a079 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=137bb560a079
summary: coders/topol.c Display header contents when debugging readers.

diffstat:

 coders/topol.c |  32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diffs (58 lines):

diff -r 051dd33a0254 -r 137bb560a079 coders/topol.c
--- a/coders/topol.c	Sun Apr 30 08:04:25 2023 +0200
+++ b/coders/topol.c	Sun Apr 30 17:59:20 2023 +0200
@@ -50,11 +50,10 @@
   magick_uint16_t Rows;
   magick_uint16_t Cols;
   magick_uint16_t FileType;     /* 0-binary, 1-8 bitu, 2-8 bits+PAL, 3-4 bits,
-                                   4-4 bits+PAL, 5-24 bits, 6-16 bits, 7-32
-                                   bits */
+                                   4-4 bits+PAL, 5-24 bits, 6-16 bits, 7-32 bits */
   magick_uint32_t Zoom;
   magick_uint16_t Version;
-  magick_uint16_t Komprese;             /* 0 - uncompressed (from release 1) */
+  magick_uint16_t Komprese;	/* 0 - uncompressed (from release 1) */
   magick_uint16_t Stav;
   double xRasMin;
   double yRasMin;
@@ -282,6 +281,32 @@
 
   return 0;
 }
+
+
+static void LogHeaderTopoL(RasHeader *pHeader)
+{
+ if(pHeader==NULL) return;
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+                        "TopoL Header:\n"
+                        "    Rows:		%u\n"
+                        "    Columns:		%u\n"
+                        "    FileType:		%u\n"
+                        "    Zoom:		%u\n"
+                        "    Version:		%u\n"
+                        "    Compression:	%u\n"
+                        "    Status:		%u",
+                               pHeader->Rows,
+			       pHeader->Cols,
+                               pHeader->FileType,
+			       pHeader->Zoom,
+                               pHeader->Version,
+			       pHeader->Komprese,
+                               pHeader->Stav);
+
+}
+
+
+
 
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -410,6 +435,7 @@
       if (EOFBlob(image))
         ThrowTOPOLReaderException(CorruptImageError,UnexpectedEndOfFile,image);
     }
+  if(image->logging) LogHeaderTopoL(&Header);
 
   for (i = 0; i < (long) sizeof(Header.Name); i++)
     {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.