aboutsummaryrefslogtreecommitdiff
path: root/graphics/tiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2004-11-16 04:14:25 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2004-11-16 04:14:25 +0000
commitdf6b8fee86463652fe49b349fc22628ad59661c5 (patch)
tree15b894a329ec3c4e9f9c3d812b15d9dedd35a7e0 /graphics/tiff
parent10520cd7e67e375ef6d4a74d9ba85fb17cdcf366 (diff)
downloadports-df6b8fee86463652fe49b349fc22628ad59661c5.tar.gz
ports-df6b8fee86463652fe49b349fc22628ad59661c5.zip
Notes
Diffstat (limited to 'graphics/tiff')
-rw-r--r--graphics/tiff/Makefile2
-rw-r--r--graphics/tiff/files/patch-tif_color.c43
-rw-r--r--graphics/tiff/files/patch-tiff2ps.c (renamed from graphics/tiff/files/patch-float)0
3 files changed, 44 insertions, 1 deletions
diff --git a/graphics/tiff/Makefile b/graphics/tiff/Makefile
index 6eb57c66f858..64ba8ad8fef1 100644
--- a/graphics/tiff/Makefile
+++ b/graphics/tiff/Makefile
@@ -9,7 +9,7 @@
PORTNAME= tiff
PORTVERSION= 3.7.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.remotesensing.org/pub/libtiff/ \
http://dl1.maptools.org/dl/libtiff/
diff --git a/graphics/tiff/files/patch-tif_color.c b/graphics/tiff/files/patch-tif_color.c
new file mode 100644
index 000000000000..9288d85ff565
--- /dev/null
+++ b/graphics/tiff/files/patch-tif_color.c
@@ -0,0 +1,43 @@
+*** libtiff/tif_color.c.ref Fri Nov 5 18:01:44 2004
+--- libtiff/tif_color.c Fri Nov 5 18:26:46 2004
+***************
+*** 170,176 ****
+ #define SHIFT 16
+ #define FIX(x) ((int32)((x) * (1L<<SHIFT) + 0.5))
+ #define ONE_HALF ((int32)(1<<(SHIFT-1)))
+! #define Code2V(c, RB, RW, CR) ((((c)-(int32)(RB))*(float)(CR))/(float)((RW)-(RB)))
+ #define CLAMP(f,min,max) ((f)<(min)?(min):(f)>(max)?(max):(f))
+
+ void
+--- 170,176 ----
+ #define SHIFT 16
+ #define FIX(x) ((int32)((x) * (1L<<SHIFT) + 0.5))
+ #define ONE_HALF ((int32)(1<<(SHIFT-1)))
+! #define Code2V(c, RB, RW, CR) ((((c)-(int32)(RB))*(float)(CR))/(float)(((RW)-(RB)) ? ((RW)-(RB)) : 1))
+ #define CLAMP(f,min,max) ((f)<(min)?(min):(f)>(max)?(max):(f))
+
+ void
+***************
+*** 243,252 ****
+ * constructing tables indexed by the raw pixel data.
+ */
+ for (i = 0, x = -128; i < 256; i++, x++) {
+! int32 Cr = (int32)Code2V(x, refBlackWhite[4] - 128.0F,
+! refBlackWhite[5] - 128.0F, 127);
+! int32 Cb = (int32)Code2V(x, refBlackWhite[2] - 128.0F,
+! refBlackWhite[3] - 128.0F, 127);
+
+ ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT);
+ ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT);
+--- 243,252 ----
+ * constructing tables indexed by the raw pixel data.
+ */
+ for (i = 0, x = -128; i < 256; i++, x++) {
+! int32 Cr = ((int32)Code2V(x, refBlackWhite[4] - 128.0F,
+! refBlackWhite[5] - 128.0F, 255)) - 128;
+! int32 Cb = ((int32)Code2V(x, refBlackWhite[2] - 128.0F,
+! refBlackWhite[3] - 128.0F, 255)) - 128;
+
+ ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT);
+ ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT);
+
diff --git a/graphics/tiff/files/patch-float b/graphics/tiff/files/patch-tiff2ps.c
index 5178a026aa35..5178a026aa35 100644
--- a/graphics/tiff/files/patch-float
+++ b/graphics/tiff/files/patch-tiff2ps.c