[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1596-g079ea7d

[email protected] (Robin Watts)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  079ea7d9e0c713a7834fc8f08d52ce42e6a03666 (commit)
      from  935408d6205742e40471b18d7f0f1fe4febc437c (commit)

----------------------------------------------------------------------
commit 079ea7d9e0c713a7834fc8f08d52ce42e6a03666
Author: Robin Watts <[email protected]>
Date:   Wed Aug 21 17:49:32 2019 +0100

    Update bmpcmp.c to read psdrgb rather than psdbgr.

diff --git a/toolbin/bmpcmp.c b/toolbin/bmpcmp.c
index 3d047e5..e558641 100644
--- a/toolbin/bmpcmp.c
+++ b/toolbin/bmpcmp.c
@@ -1255,7 +1255,8 @@ static void *psd_read(ImageReader *im,
             }
             ptr += *span * h + 1;
         } else if (n == 3) {
-            /* RGB */
+            /* RGB (reverse to get BGR) */
+            ptr += 2;
             for (z = 0; z < n; z++)
             {
                 for (y = 0; y < h; y++)
@@ -1269,8 +1270,9 @@ static void *psd_read(ImageReader *im,
                     ptr -= w*N + *span;
                     line -= w;
                 }
-                ptr += *span * h + 1;
+                ptr += *span * h - 1;
             }
+            ptr += 4;
             for (y = 0; y < h; y++)
             {
                 for (x = 0; x < w; x++)
@@ -1320,7 +1322,8 @@ static void *psd_read(ImageReader *im,
             }
             ptr += *span * h + 1;
         } else if (n == 3) {
-            /* RGB */
+            /* RGB (reverse to get BGR) */
+            ptr += 2;
             for (z = 0; z < n; z++)
             {
                 for (y = 0; y < h; y++)
@@ -1335,8 +1338,9 @@ static void *psd_read(ImageReader *im,
                     ptr -= w*N + *span;
                     line -= w*2;
                 }
-                ptr += *span * h + 1;
+                ptr += *span * h - 1;
             }
+            ptr += 4;
             for (y = 0; y < h; y++)
             {
                 for (x = 0; x < w; x++)
@@ -2515,7 +2519,7 @@ static void untag_bmp(unsigned char *bmp,
         for (x = 0; x < w; x++)
         {
             int R, G, B, T, r, g, b;
- 
+
             T = *bmp++;
             R = *bmp++;
             G = *bmp++;


Summary of changes:
 toolbin/bmpcmp.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
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.