]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/image-tiff.c
Merge changes from CUPS 1.5.1-r9875.
[thirdparty/cups.git] / filter / image-tiff.c
index 3622359b6506dfb8a253f4e334250790d8b0749a..8e09ee5ce2cb8d21531922262f1ae155c5a24d84 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id$"
+ * "$Id: image-tiff.c 6649 2007-07-11 21:46:42Z mike $"
  *
- *   TIFF file routines for the Common UNIX Printing System (CUPS).
+ *   TIFF file routines for CUPS.
  *
- *   Copyright 1993-2006 by Easy Software Products.
+ *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 1993-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  *   This file is subject to the Apple OS-Developed Software exception.
  *
@@ -100,14 +91,14 @@ _cupsImageReadTIFF(
 
   if ((tif = TIFFFdOpen(fileno(fp), "", "r")) == NULL)
   {
-    fputs("ERROR: TIFFFdOpen() failed!\n", stderr);
+    fputs("DEBUG: TIFFFdOpen() failed!\n", stderr);
     fclose(fp);
     return (-1);
   }
 
   if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width))
   {
-    fputs("ERROR: No image width tag in the file!\n", stderr);
+    fputs("DEBUG: No image width tag in the file!\n", stderr);
     TIFFClose(tif);
     fclose(fp);
     return (-1);
@@ -115,7 +106,7 @@ _cupsImageReadTIFF(
 
   if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height))
   {
-    fputs("ERROR: No image height tag in the file!\n", stderr);
+    fputs("DEBUG: No image height tag in the file!\n", stderr);
     TIFFClose(tif);
     fclose(fp);
     return (-1);
@@ -123,7 +114,7 @@ _cupsImageReadTIFF(
 
   if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric))
   {
-    fputs("ERROR: No photometric tag in the file!\n", stderr);
+    fputs("DEBUG: No photometric tag in the file!\n", stderr);
     TIFFClose(tif);
     fclose(fp);
     return (-1);
@@ -131,7 +122,7 @@ _cupsImageReadTIFF(
 
   if (!TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression))
   {
-    fputs("ERROR: No compression tag in the file!\n", stderr);
+    fputs("DEBUG: No compression tag in the file!\n", stderr);
     TIFFClose(tif);
     fclose(fp);
     return (-1);
@@ -176,7 +167,7 @@ _cupsImageReadTIFF(
 
     if (img->xppi == 0 || img->yppi == 0)
     {
-      fputs("ERROR: Bad TIFF resolution.\n", stderr);
+      fputs("DEBUG: Bad TIFF resolution.\n", stderr);
       img->xppi = img->yppi = 128;
     }
 
@@ -204,7 +195,7 @@ _cupsImageReadTIFF(
       (bits != 1 && bits != 2 && bits != 4 && bits != 8) ||
       samples < 1 || samples > 4)
   {
-    fprintf(stderr, "ERROR: Bad TIFF dimensions %ux%ux%ux%u!\n",
+    fprintf(stderr, "DEBUG: Bad TIFF dimensions %ux%ux%ux%u!\n",
             (unsigned)width, (unsigned)height, (unsigned)bits,
            (unsigned)samples);
     TIFFClose(tif);
@@ -664,7 +655,7 @@ _cupsImageReadTIFF(
     case PHOTOMETRIC_PALETTE :
        if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &redcmap, &greencmap, &bluecmap))
        {
-          fputs("ERROR: No colormap tag in the file!\n", stderr);
+          fputs("DEBUG: No colormap tag in the file!\n", stderr);
          fclose(fp);
          return (-1);
        }
@@ -1701,7 +1692,7 @@ _cupsImageReadTIFF(
        free(out);
 
        TIFFClose(tif);
-       fputs("ERROR: Unknown TIFF photometric value!\n", stderr);
+       fputs("DEBUG: Unknown TIFF photometric value!\n", stderr);
        return (-1);
   }
 
@@ -1720,5 +1711,5 @@ _cupsImageReadTIFF(
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: image-tiff.c 6649 2007-07-11 21:46:42Z mike $".
  */