]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Removed licensing stuff from filter directory.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 4 Jun 1999 21:05:43 +0000 (21:05 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 4 Jun 1999 21:05:43 +0000 (21:05 +0000)
Updated gamma correction code for PostScript filters - now check for
negative values before doing gamma correction (it's not supposed to
happen, but apparently does with some Tektronix printers).

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@369 7a7537e8-13f0-0310-91df-b6672ffda945

filter/imagetops.c
filter/pstops.c

index f7e9bcec01971f50d12e544634067ede063a9bda..6d1c9a90ad5254ccd50f4299472febbba206b8ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: imagetops.c,v 1.12 1999/04/21 14:12:46 mike Exp $"
+ * "$Id: imagetops.c,v 1.13 1999/06/04 21:05:42 mike Exp $"
  *
  *   Image file to PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -245,12 +245,16 @@ main(int  argc,           /* I - Number of command-line arguments */
 
   puts("%!");
 
+  if (ppd != NULL && ppd->patches != NULL)
+    puts(ppd->patches);
+
   ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
   ppdEmit(ppd, stdout, PPD_ORDER_ANY);
   ppdEmit(ppd, stdout, PPD_ORDER_PROLOG);
 
   if (g != 1.0 || b != 1.0)
-    printf("{ neg 1 add %.3f exp neg 1 add %.3f mul } bind settransfer\n", g, b);
+    printf("{ neg 1 add dup 0 lt { pop 1 } { %.3f exp neg 1 add } "
+           "ifelse %.3f mul } bind settransfer\n", g, b);
 
   if (Copies > 1 && !slowcollate)
   {
@@ -482,5 +486,5 @@ ps_ascii85(ib_t *data,              /* I - Data to print */
 
 
 /*
- * End of "$Id: imagetops.c,v 1.12 1999/04/21 14:12:46 mike Exp $".
+ * End of "$Id: imagetops.c,v 1.13 1999/06/04 21:05:42 mike Exp $".
  */
index f04ebc0c9ff7c37d39ba7b6533291bbd91e0c7e5..25d5ca2d8f410481d56ddefa268b9769dc231ba4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: pstops.c,v 1.17 1999/05/18 21:21:46 mike Exp $"
+ * "$Id: pstops.c,v 1.18 1999/06/04 21:05:43 mike Exp $"
  *
  *   PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -242,6 +242,9 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
   puts(line);
 
+  if (ppd != NULL && ppd->patches != NULL)
+    puts(ppd->patches);
+
   ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
   ppdEmit(ppd, stdout, PPD_ORDER_ANY);
   ppdEmit(ppd, stdout, PPD_ORDER_PROLOG);
@@ -253,7 +256,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
          "end");
 
   if (g != 1.0 || b != 1.0)
-    printf("{ neg 1 add %.3f exp neg 1 add %.3f mul } bind settransfer\n", g, b);
+    printf("{ neg 1 add dup 0 lt { pop 1 } { %.3f exp neg 1 add } "
+           "ifelse %.3f mul } bind settransfer\n", g, b);
 
   if (Copies > 1 && (!Collate || !slowcollate))
     printf("/#copies %d def\n", Copies);
@@ -716,5 +720,5 @@ start_nup(int number)       /* I - Page number */
 
 
 /*
- * End of "$Id: pstops.c,v 1.17 1999/05/18 21:21:46 mike Exp $".
+ * End of "$Id: pstops.c,v 1.18 1999/06/04 21:05:43 mike Exp $".
  */