]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/image-photocd.c
Load cups into easysw/current.
[thirdparty/cups.git] / filter / image-photocd.c
index 4e77ea9e09780974315be4d8b34fcd3d1e82d725..00171ecc1fd03775dde8fe194b56e0909b4fb620 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-photocd.c 4741 2005-10-02 04:25:52Z mike $"
+ * "$Id: image-photocd.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   PhotoCD routines for the Common UNIX Printing System (CUPS).
  *
@@ -7,7 +7,7 @@
  *   is only YCC encoded.  Support for the higher resolution images will
  *   require a lot of extra code...
  *
- *   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
@@ -272,39 +272,29 @@ _cupsImageReadPhotoCD(
        * put it in the image...
        */
 
-        if (img->colorspace == CUPS_IMAGE_RGB)
+       switch (img->colorspace)
        {
-         if (lut)
-           cupsImageLut(rgb, 768 * 3, lut);
-
-         if (rotation)
-            _cupsImagePutCol(img, 511 - y - pass, 0, 768, rgb);
-         else
-            _cupsImagePutRow(img, 0, y + pass, 768, rgb);
+         default :
+             break;
+
+         case CUPS_IMAGE_RGB :
+             cupsImageRGBToRGB(rgb, out, 768);
+             break;
+         case CUPS_IMAGE_CMY :
+             cupsImageRGBToCMY(rgb, out, 768);
+             break;
+         case CUPS_IMAGE_CMYK :
+             cupsImageRGBToCMYK(rgb, out, 768);
+             break;
        }
-       else
-       {
-         switch (img->colorspace)
-         {
-           default :
-               break;
-
-           case CUPS_IMAGE_CMY :
-               cupsImageRGBToCMY(rgb, out, 768);
-               break;
-           case CUPS_IMAGE_CMYK :
-               cupsImageRGBToCMYK(rgb, out, 768);
-               break;
-         }
 
-         if (lut)
-           cupsImageLut(out, 768 * bpp, lut);
+       if (lut)
+         cupsImageLut(out, 768 * bpp, lut);
 
-         if (rotation)
-            _cupsImagePutCol(img, 511 - y - pass, 0, 768, out);
-         else
-            _cupsImagePutRow(img, 0, y + pass, 768, out);
-       }
+       if (rotation)
+          _cupsImagePutCol(img, 511 - y - pass, 0, 768, out);
+       else
+          _cupsImagePutRow(img, 0, y + pass, 768, out);
       }
     }
   }
@@ -323,5 +313,5 @@ _cupsImageReadPhotoCD(
 
 
 /*
- * End of "$Id: image-photocd.c 4741 2005-10-02 04:25:52Z mike $".
+ * End of "$Id: image-photocd.c 5508 2006-05-11 11:41:16Z mike $".
  */