[gs-cvs] gs/src

Igor Melichev igor at casper.ghostscript.com
Mon Jul 15 12:25:13 PDT 2002


Update of /cvs/ghostscript/gs/src
In directory casper:/tmp/cvs-serv7899/gs/src

Modified Files:
	gdevpdfj.c 
Log Message:
Fix: (pdfwrite) Enforce compression choice on end of image;
do not choose with zero output length.


Index: gdevpdfj.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpdfj.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gdevpdfj.c	27 Jun 2002 04:03:03 -0000	1.21
+++ gdevpdfj.c	15 Jul 2002 19:25:11 -0000	1.22
@@ -527,7 +527,7 @@
     l1 = cos_stream_length(s[1]);
     k0 = s_compr_chooser__get_choice(
 	(stream_compr_chooser_state *)piw->binary[2].strm->state, force);
-    if (k0)
+    if (k0 && l0 > 0 && l1 > 0)
 	k0--;
     else if (much_bigger__DL(l0, l1))
 	k0 = 0; 
@@ -564,7 +564,7 @@
 	status = s_close_filters(&piw->binary[1].strm, piw->binary[1].target);
 	if (status < 0)
 	    return status;
-    } else
-	pdf_choose_compression_cos(piw, s, end_binary);
+    }
+    pdf_choose_compression_cos(piw, s, end_binary);
     return 0;
 }




More information about the gs-cvs mailing list