]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/image-pix.c
Load cups into easysw/current.
[thirdparty/cups.git] / filter / image-pix.c
index 2a326cd98a235f21a5367a1ca56969504c98f036..ac471669dda942689003bef9fba0e3413abe672f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: image-pix.c 4741 2005-10-02 04:25:52Z mike $"
+ * "$Id: image-pix.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   Alias PIX image routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -159,10 +159,7 @@ _cupsImageReadPIX(
   {
     for (count = 0, y = 0, r = 0, g = 0, b = 0; y < img->ysize; y ++)
     {
-      if (img->colorspace == CUPS_IMAGE_RGB)
-        ptr = out;
-      else
-        ptr = in;
+      ptr = in;
 
       for (x = img->xsize; x > 0; x --, count --)
       {
@@ -179,34 +176,29 @@ _cupsImageReadPIX(
         *ptr++ = b;
       }
 
-      if (img->colorspace == CUPS_IMAGE_RGB)
-      {
-       if (saturation != 100 || hue != 0)
-         cupsImageRGBAdjust(out, img->xsize, saturation, hue);
-      }
-      else
-      {
-       if (saturation != 100 || hue != 0)
-         cupsImageRGBAdjust(in, img->xsize, saturation, hue);
+      if (saturation != 100 || hue != 0)
+       cupsImageRGBAdjust(in, img->xsize, saturation, hue);
 
-       switch (img->colorspace)
-       {
-         default :
-             break;
-
-         case CUPS_IMAGE_WHITE :
-             cupsImageRGBToWhite(in, out, img->xsize);
-             break;
-         case CUPS_IMAGE_BLACK :
-             cupsImageRGBToBlack(in, out, img->xsize);
-             break;
-         case CUPS_IMAGE_CMY :
-             cupsImageRGBToCMY(in, out, img->xsize);
-             break;
-         case CUPS_IMAGE_CMYK :
-             cupsImageRGBToCMYK(in, out, img->xsize);
-             break;
-       }
+      switch (img->colorspace)
+      {
+       default :
+           break;
+
+       case CUPS_IMAGE_WHITE :
+           cupsImageRGBToWhite(in, out, img->xsize);
+           break;
+       case CUPS_IMAGE_RGB :
+           cupsImageRGBToWhite(in, out, img->xsize);
+           break;
+       case CUPS_IMAGE_BLACK :
+           cupsImageRGBToBlack(in, out, img->xsize);
+           break;
+       case CUPS_IMAGE_CMY :
+           cupsImageRGBToCMY(in, out, img->xsize);
+           break;
+       case CUPS_IMAGE_CMYK :
+           cupsImageRGBToCMYK(in, out, img->xsize);
+           break;
       }
 
       if (lut)
@@ -240,5 +232,5 @@ read_short(FILE *fp)                        /* I - File to read from */
 
 
 /*
- * End of "$Id: image-pix.c 4741 2005-10-02 04:25:52Z mike $".
+ * End of "$Id: image-pix.c 5508 2006-05-11 11:41:16Z mike $".
  */