summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSam Leffler <sam@engr.sgi.com>1996-04-29 22:16:05 +0100
committerRoger Leigh <rleigh@codelibre.net>2022-06-22 18:38:42 +0100
commit901d6d6f2fb4fcde08a758a61f99de0a3fa6abaa (patch)
tree72ef9c9551f19bb4db5b2abbb45b27601537fb91 /tools
parentc205122210e4b59a8501753601b74e68acf37f00 (diff)
downloadlibtiff-git-901d6d6f2fb4fcde08a758a61f99de0a3fa6abaa.tar.gz
v3.4beta033 releasev3.4beta033
Note: VERSION is 3.4 and original release archive is named tiff-v3.4-tar.gz but the actual content of the archive has the changes for v3.4beta033 and the changes fit into the sequence between v3.4beta032 and v3.4beta034.
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in2
-rw-r--r--tools/Makefile.lcc2
-rw-r--r--tools/fax2ps.c10
-rw-r--r--tools/fax2tiff.c2
-rw-r--r--tools/gif2tiff.c6
-rw-r--r--tools/pal2rgb.c2
-rw-r--r--tools/ppm2tiff.c6
-rw-r--r--tools/ras2tiff.c2
-rw-r--r--tools/rasterfile.h2
-rw-r--r--tools/rgb2ycbcr.c2
-rw-r--r--tools/sgi2tiff.c2
-rw-r--r--tools/sgigt.c2
-rw-r--r--tools/sgisv.c2
-rw-r--r--tools/thumbnail.c2
-rw-r--r--tools/tiff2bw.c2
-rw-r--r--tools/tiff2ps.c2
-rw-r--r--tools/tiffcmp.c2
-rw-r--r--tools/tiffcp.c2
-rw-r--r--tools/tiffdither.c2
-rw-r--r--tools/tiffdump.c2
-rw-r--r--tools/tiffinfo.c2
-rw-r--r--tools/tiffmedian.c2
-rw-r--r--tools/tiffsplit.c2
-rw-r--r--tools/ycbcr.c2
24 files changed, 37 insertions, 27 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 2ae6bfba..4b467ce1 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.18 1996/03/18 20:56:15 sam Exp $
+# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.18 1996/03/18 20:56:15 sam Rel $
#
# @WARNING@
#
diff --git a/tools/Makefile.lcc b/tools/Makefile.lcc
index 0e78b453..079fed33 100644
--- a/tools/Makefile.lcc
+++ b/tools/Makefile.lcc
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.lcc,v 1.4 1996/01/10 19:35:26 sam Exp $
+# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.lcc,v 1.4 1996/01/10 19:35:26 sam Rel $
#
# TIFF Library Tools
#
diff --git a/tools/fax2ps.c b/tools/fax2ps.c
index edf6cbb6..426675db 100644
--- a/tools/fax2ps.c
+++ b/tools/fax2ps.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/fax2ps.c,v 1.9 1996/01/10 19:35:26 sam Exp $" */
+/* $Header: /usr/people/sam/tiff/tools/RCS/fax2ps.c,v 1.10 1996/04/29 21:58:49 sam Rel $" */
/*
* Copyright (c) 1991-1996 Sam Leffler
@@ -28,7 +28,11 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
+#ifndef VMS
#include <unistd.h>
+#else
+#include <unixio.h>
+#endif
#include "tiffio.h"
@@ -383,7 +387,11 @@ main(int argc, char** argv)
while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0)
write(fileno(fd), buf, n);
tif = TIFFOpen(temp, "r");
+#ifndef VMS
unlink(temp);
+#else
+ remove(temp);
+#endif
if (tif) {
fax2ps(tif, npages, pages, "<stdin>");
TIFFClose(tif);
diff --git a/tools/fax2tiff.c b/tools/fax2tiff.c
index 9ceb5278..d2e2a555 100644
--- a/tools/fax2tiff.c
+++ b/tools/fax2tiff.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/fax2tiff.c,v 1.40 1996/01/10 19:35:27 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/fax2tiff.c,v 1.40 1996/01/10 19:35:27 sam Rel $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
diff --git a/tools/gif2tiff.c b/tools/gif2tiff.c
index 1bd5d885..935c8cac 100644
--- a/tools/gif2tiff.c
+++ b/tools/gif2tiff.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/gif2tiff.c,v 1.26 1996/01/10 19:35:28 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/gif2tiff.c,v 1.27 1996/04/22 22:03:26 sam Rel $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
@@ -40,8 +40,8 @@
#include "tiffio.h"
-#ifdef _WINDOWS
-#define BINMODE "w"
+#if defined(_WINDOWS) || defined(MSDOS)
+#define BINMODE "b"
#else
#define BINMODE
#endif
diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
index e26d7318..fec27334 100644
--- a/tools/pal2rgb.c
+++ b/tools/pal2rgb.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/pal2rgb.c,v 1.29 1996/01/10 19:35:29 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/pal2rgb.c,v 1.29 1996/01/10 19:35:29 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/ppm2tiff.c b/tools/ppm2tiff.c
index 4359d0d4..02be2604 100644
--- a/tools/ppm2tiff.c
+++ b/tools/ppm2tiff.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/ppm2tiff.c,v 1.25 1996/03/19 16:57:54 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/ppm2tiff.c,v 1.26 1996/04/22 22:03:26 sam Rel $ */
/*
* Copyright (c) 1991-1996 Sam Leffler
@@ -31,8 +31,8 @@
#include "tiffio.h"
-#ifdef _WINDOWS
-#define BINMODE "w"
+#if defined(_WINDOWS) || defined(MSDOS)
+#define BINMODE "b"
#else
#define BINMODE
#endif
diff --git a/tools/ras2tiff.c b/tools/ras2tiff.c
index a82e9101..d168a7c1 100644
--- a/tools/ras2tiff.c
+++ b/tools/ras2tiff.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/ras2tiff.c,v 1.29 1996/01/10 19:35:30 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/ras2tiff.c,v 1.29 1996/01/10 19:35:30 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/rasterfile.h b/tools/rasterfile.h
index 30c09a7c..15126e86 100644
--- a/tools/rasterfile.h
+++ b/tools/rasterfile.h
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/rasterfile.h,v 1.1 1990/10/08 17:24:23 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/rasterfile.h,v 1.1 1990/10/08 17:24:23 sam Rel $ */
/*
* Description of header for files containing raster images
diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c
index f034dc44..b96115ff 100644
--- a/tools/rgb2ycbcr.c
+++ b/tools/rgb2ycbcr.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/rgb2ycbcr.c,v 1.27 1996/01/10 19:35:31 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/rgb2ycbcr.c,v 1.27 1996/01/10 19:35:31 sam Rel $ */
/*
* Copyright (c) 1991-1996 Sam Leffler
diff --git a/tools/sgi2tiff.c b/tools/sgi2tiff.c
index 01d3d7c6..223cec59 100644
--- a/tools/sgi2tiff.c
+++ b/tools/sgi2tiff.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/sgi2tiff.c,v 1.26 1996/01/10 19:35:31 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/sgi2tiff.c,v 1.26 1996/01/10 19:35:31 sam Rel $ */
/*
* Copyright (c) 1991-1996 Sam Leffler
diff --git a/tools/sgigt.c b/tools/sgigt.c
index 4e5ed0e7..59297181 100644
--- a/tools/sgigt.c
+++ b/tools/sgigt.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/sgigt.c,v 1.66 1996/01/10 19:35:32 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/sgigt.c,v 1.66 1996/01/10 19:35:32 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/sgisv.c b/tools/sgisv.c
index 3b14ff11..96123bfe 100644
--- a/tools/sgisv.c
+++ b/tools/sgisv.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/sgisv.c,v 1.25 1996/01/10 19:35:33 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/sgisv.c,v 1.25 1996/01/10 19:35:33 sam Rel $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
diff --git a/tools/thumbnail.c b/tools/thumbnail.c
index a5f72cdb..fe703197 100644
--- a/tools/thumbnail.c
+++ b/tools/thumbnail.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/thumbnail.c,v 1.11 1996/01/10 19:35:33 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/thumbnail.c,v 1.11 1996/01/10 19:35:33 sam Rel $ */
/*
* Copyright (c) 1994-1996 Sam Leffler
diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c
index c0f0945c..acae3b77 100644
--- a/tools/tiff2bw.c
+++ b/tools/tiff2bw.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiff2bw.c,v 1.21 1996/01/10 19:35:34 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiff2bw.c,v 1.21 1996/01/10 19:35:34 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
index d3e27558..ae704c81 100644
--- a/tools/tiff2ps.c
+++ b/tools/tiff2ps.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiff2ps.c,v 1.48 1996/01/10 19:35:35 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiff2ps.c,v 1.48 1996/01/10 19:35:35 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffcmp.c b/tools/tiffcmp.c
index 570611ab..13f0c926 100644
--- a/tools/tiffcmp.c
+++ b/tools/tiffcmp.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffcmp.c,v 1.29 1996/01/10 19:35:36 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffcmp.c,v 1.29 1996/01/10 19:35:36 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
index c87cc46c..8663f4c4 100644
--- a/tools/tiffcp.c
+++ b/tools/tiffcp.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffcp.c,v 1.48 1996/01/10 19:35:36 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffcp.c,v 1.48 1996/01/10 19:35:36 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffdither.c b/tools/tiffdither.c
index cf1e671f..355721c3 100644
--- a/tools/tiffdither.c
+++ b/tools/tiffdither.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffdither.c,v 1.26 1996/01/10 19:35:37 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffdither.c,v 1.26 1996/01/10 19:35:37 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffdump.c b/tools/tiffdump.c
index 16a9f3a3..2b2a9b72 100644
--- a/tools/tiffdump.c
+++ b/tools/tiffdump.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffdump.c,v 1.49 1996/03/29 16:38:33 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffdump.c,v 1.49 1996/03/29 16:38:33 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c
index fc53887f..d80a99fb 100644
--- a/tools/tiffinfo.c
+++ b/tools/tiffinfo.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffinfo.c,v 1.26 1996/01/10 19:35:39 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffinfo.c,v 1.26 1996/01/10 19:35:39 sam Rel $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c
index 967bb185..ff354fed 100644
--- a/tools/tiffmedian.c
+++ b/tools/tiffmedian.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffmedian.c,v 1.18 1995/10/10 00:35:22 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffmedian.c,v 1.18 1995/10/10 00:35:22 sam Rel $ */
/*
* Apply median cut on an image.
diff --git a/tools/tiffsplit.c b/tools/tiffsplit.c
index 48baf8ec..49108e0b 100644
--- a/tools/tiffsplit.c
+++ b/tools/tiffsplit.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/tools/RCS/tiffsplit.c,v 1.13 1996/01/10 19:35:40 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/tools/RCS/tiffsplit.c,v 1.13 1996/01/10 19:35:40 sam Rel $ */
/*
* Copyright (c) 1992-1996 Sam Leffler
diff --git a/tools/ycbcr.c b/tools/ycbcr.c
index 065d62ed..2fdfb0ce 100644
--- a/tools/ycbcr.c
+++ b/tools/ycbcr.c
@@ -23,6 +23,7 @@ unsigned long preveBits = 0;
static void setupLumaTables();
static int abs(int v) { return (v < 0 ? -v : v); }
static double pct(int v,double range) { return (v*100. / range); }
+static void check(int R, int G, int B);
float D1, D2;
float D3, D4;
@@ -111,6 +112,7 @@ V2Code(float f, unsigned long RB, unsigned long RW, int CR)
#define CLAMP(f,min,max) \
(int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)
+static
void
check(int R, int G, int B)
{