]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/image-sgi.c
Load cups into easysw/current.
[thirdparty/cups.git] / filter / image-sgi.c
index 4ea91ce63a3b985456fb192066e019173421709c..288af2618763c04ee87b9cbcfa9a02f685f00fbb 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: image-sgi.c 4741 2005-10-02 04:25:52Z mike $"
+ * "$Id: image-sgi.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   SGI image file 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
@@ -236,45 +236,35 @@ _cupsImageReadSGI(
     }
     else
     {
-      if (img->colorspace == CUPS_IMAGE_RGB)
-      {
-       if (saturation != 100 || hue != 0)
-         cupsImageRGBAdjust(in, img->xsize, saturation, hue);
-
-        if (lut)
-         cupsImageLut(in, img->xsize * 3, lut);
+      if ((saturation != 100 || hue != 0) && bpp > 1)
+       cupsImageRGBAdjust(in, img->xsize, saturation, hue);
 
-        _cupsImagePutRow(img, 0, y, img->xsize, in);
-      }
-      else
+      switch (img->colorspace)
       {
-       if ((saturation != 100 || hue != 0) && bpp > 1)
-         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;
-       }
+       default :
+           break;
+
+       case CUPS_IMAGE_WHITE :
+           cupsImageRGBToWhite(in, out, img->xsize);
+           break;
+       case CUPS_IMAGE_RGB :
+           cupsImageRGBToRGB(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)
-         cupsImageLut(out, img->xsize * bpp, lut);
+      if (lut)
+       cupsImageLut(out, img->xsize * bpp, lut);
 
-        _cupsImagePutRow(img, 0, y, img->xsize, out);
-      }
+      _cupsImagePutRow(img, 0, y, img->xsize, out);
     }
   }
 
@@ -289,5 +279,5 @@ _cupsImageReadSGI(
 
 
 /*
- * End of "$Id: image-sgi.c 4741 2005-10-02 04:25:52Z mike $".
+ * End of "$Id: image-sgi.c 5508 2006-05-11 11:41:16Z mike $".
  */