/*
- * "$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.
*
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);
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);
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);
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);
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;
}
(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);
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);
}
free(out);
TIFFClose(tif);
- fputs("ERROR: Unknown TIFF photometric value!\n", stderr);
+ fputs("DEBUG: Unknown TIFF photometric value!\n", stderr);
return (-1);
}
/*
- * End of "$Id$".
+ * End of "$Id: image-tiff.c 6649 2007-07-11 21:46:42Z mike $".
*/