[gs-commits] ghostpdl branch, pdfi, updated. jbig2dec-0.14-2340-ga16ffd8

[email protected] (Nancy Durgin) Thu, 24 Oct 2019 22:21:10 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, pdfi has been updated
       via  a16ffd8a2ac59362040662a3d0af3a112634ff06 (commit)
       via  9fa0814332ae36cde9706be0287296d4c4ecd558 (commit)
      from  b7802a1880ef4b16386a3be008bbbfac01d0cb6a (commit)

----------------------------------------------------------------------
commit a16ffd8a2ac59362040662a3d0af3a112634ff06
Author: Nancy Durgin <[email protected]>
Date:   Thu Oct 24 09:21:07 2019 -0700

    Fix 're' command to draw the rectangle in the other order
    
    Should draw it counter-clockwise instead of clockwise, as per PDF spec.
    
    This was causing bugs on files such as fts_14_1408.pdf
    
    I also changed it to use rlineto instead of lineto, because it seems
    slightly more efficient.  Now it matches the gs implementation that also
    uses rlineto.

diff --git a/pdf/pdf_path.c b/pdf/pdf_path.c
index 2d39b88..0f398a6 100644
--- a/pdf/pdf_path.c
+++ b/pdf/pdf_path.c
@@ -537,11 +537,11 @@ int pdfi_rectpath(pdf_context *ctx)
 
     code = gs_moveto(ctx->pgs, Values[0], Values[1]);
     if (code == 0) {
-        code = gs_lineto(ctx->pgs, Values[0], Values[1] + Values[3]);
+        code = gs_rlineto(ctx->pgs, Values[2], 0);
         if (code == 0){
-            code = gs_lineto(ctx->pgs, Values[0] + Values[2], Values[1] + Values[3]);
+            code = gs_rlineto(ctx->pgs, 0, Values[3]);
             if (code == 0) {
-                code = gs_lineto(ctx->pgs, Values[0] + Values[2], Values[1]);
+                code = gs_rlineto(ctx->pgs, -Values[2], 0);
                 if (code == 0){
                     code = gs_closepath(ctx->pgs);
                 }

----------------------------------------------------------------------
commit 9fa0814332ae36cde9706be0287296d4c4ecd558
Author: Nancy Durgin <[email protected]>
Date:   Wed Oct 23 13:29:38 2019 -0700

    Change pdf implementation to use CalGray and CalRGB
    
    It was previously mapping these to DeviceGray and DeviceRGB for some
    reason.
    
    See tests_private/pdf/PDF_1.7_FTS/fts_08_0829.pdf for example where this
    matters.

diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps
index d594035..cc25751 100644
--- a/Resource/Init/pdf_ops.ps
+++ b/Resource/Init/pdf_ops.ps
@@ -279,8 +279,8 @@ currentdict /gput_always_allow .undef
   /DeviceCMYK { [0 0 0 1] cvx } bind executeonly
   /CIEBasedA { 0 } bind executeonly
   /CIEBasedABC { [0 0 0] cvx } bind executeonly
-  /CalGray { pop /DeviceGray 0 } bind executeonly
-  /CalRGB { pop /DeviceRGB [0 0 0] cvx } bind executeonly
+  /CalGray { 0 } bind executeonly
+  /CalRGB { [0 0 0] cvx } bind executeonly
   /Lab {[0 0 0] cvx } bind executeonly
   /ICCBased { [ 1 index 1 oget /N get { 0 } repeat ] cvx } bind executeonly
   /Separation { 1 } bind executeonly


Summary of changes:
 Resource/Init/pdf_ops.ps | 4 ++--
 pdf/pdf_path.c           | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)