[gs-commits] rev 11780 - trunk/ghostpdl/pxl

henrys at ghostscript.com henrys at ghostscript.com
Fri Oct 8 15:01:16 UTC 2010


Author: henrys
Date: 2010-10-08 15:01:16 +0000 (Fri, 08 Oct 2010)
New Revision: 11780

Modified:
   trunk/ghostpdl/pxl/pximage.c
   trunk/ghostpdl/pxl/pxstate.h
   trunk/ghostpdl/pxl/pxtop.c
Log:
Add parsing of the interpolation device parameter to PXL.  PCL already
supported it.  XPS and SVG should be modified to support parsing the
parameter as well.



Modified: trunk/ghostpdl/pxl/pximage.c
===================================================================
--- trunk/ghostpdl/pxl/pximage.c	2010-10-08 14:42:18 UTC (rev 11779)
+++ trunk/ghostpdl/pxl/pximage.c	2010-10-08 15:01:16 UTC (rev 11780)
@@ -614,6 +614,8 @@
 	  gs_matrix_multiply(&dmat, &imat, &pxenum->image.ImageMatrix);
 	}
 	pxenum->image.CombineWithColor = true;
+        pxenum->image.Interpolate = pxs->interpolate;
+
 	code = pl_begin_image(pgs, &pxenum->image, &pxenum->info);
 	if ( code < 0 )
 	  { gs_free_object(pxs->memory, pxenum->row, "pxReadImage(row)");

Modified: trunk/ghostpdl/pxl/pxstate.h
===================================================================
--- trunk/ghostpdl/pxl/pxstate.h	2010-10-08 14:42:18 UTC (rev 11779)
+++ trunk/ghostpdl/pxl/pxstate.h	2010-10-08 15:01:16 UTC (rev 11780)
@@ -139,6 +139,8 @@
   px_pattern_enum_t *pattern_enum;
 
 	/* Miscellaneous */
+  bool interpolate; /* image interpolation */
+
   struct db_ {
     byte *data;
     uint size;

Modified: trunk/ghostpdl/pxl/pxtop.c
===================================================================
--- trunk/ghostpdl/pxl/pxtop.c	2010-10-08 14:42:18 UTC (rev 11779)
+++ trunk/ghostpdl/pxl/pxtop.c	2010-10-08 15:01:16 UTC (rev 11780)
@@ -301,6 +301,12 @@
 	return 0;
 }
 
+static bool
+pxl_get_interpolation(pl_interp_instance_t *instance)
+{
+    return instance->interpolate;
+}
+
 /* Set a device into an interperter instance */
 static int   /* ret 0 ok, else -ve error code */
 pxl_impl_set_device(
@@ -310,10 +316,13 @@
 {
 	int code;
 	pxl_interp_instance_t *pxli = (pxl_interp_instance_t *)instance;
+	px_state_t *pxs = pxli->pxs;
+
 	enum {Sbegin, Ssetdevice, Sinitg, Sgsave, Serase, Sdone} stage;
 	stage = Sbegin;
 	gs_opendevice(device);
 
+        pxs->interpolate = pxl_get_interpolation(instance);
 	/* Set the device into the gstate */
 	stage = Ssetdevice;
 	if ((code = gs_setdevice_no_erase(pxli->pgs, device)) < 0)	/* can't erase yet */



More information about the gs-commits mailing list