2
# Copyright (C) 2003 GraphicsMagick Group
3
# Copyright (C) 2002 ImageMagick Studio
4
# Copyright (C) 1991-1999 E. I. du Pont de Nemours and Company
6
# This program is covered by multiple licenses, which are described in
7
# Copyright.txt. You should have received a copy of Copyright.txt with this
8
# package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
11
# Test writing TIFF images
13
# Contributed by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
15
BEGIN { $| = 1; $test=1; print "1..10\n"; }
16
END {print "not ok $test\n" unless $loaded;}
21
require 't/subroutines.pl';
23
chdir 't/tiff' || die 'Cd failed';
26
# 1) Test 4-bit pseudocolor image
28
print("PsuedoColor image (4 bits/sample) ...\n");
29
testReadWrite( 'input_16.tiff',
32
'a0313f6235a3158655412e1480c2f37549d89a5cacf40abc854811af1b757159');
35
# 2) Test 8-bit pseudocolor image
38
print("PsuedoColor image (8 bits/sample) ...\n");
39
testReadWrite( 'input_256.tiff',
42
'a570df6d4c214d08bccaaee856f617883fee4f96494af6ef5e25c76d86ea0e0a');
45
# 3) Test 4-bit pseudocolor + matte channel image
48
print("PsuedoColor image (4 bits/sample + matte channel) ...\n");
49
testReadWrite( 'input_16_matte.tiff',
50
'output_16_matte.tiff',
52
'631c0997280217f3f430336513f1e51fe03e04f552d49a848449a438c100aa20');
55
# 4) Test 8-bit pseudocolor + matte channel image
58
print("PsuedoColor image (8 bits/sample + matte channel) ...\n");
59
testReadWrite( 'input_256_matte.tiff',
60
'output_256_matte.tiff',
62
'a3f865320dc8b7953850babbd22d468d821c0103cc14063d6459159506a910d6');
65
# 5) Test truecolor image
68
print("TrueColor image (8 bits/sample) ...\n");
69
testReadWrite( 'input_truecolor.tiff',
70
'output_truecolor.tiff',
72
'326599218925e7aa27c735d482332744cccf41f460a1ba2d276a2d172f2b3de0' );
75
# 6) Test monochrome image
78
print("Gray image (1 bit per sample) ...\n");
79
testReadWrite( 'input_mono.tiff',
82
'2b48bcf7d93cc31a8deb3026d872f1bb0a300b0f4e177423e5301adc638179e4' );
85
# 7) Test gray 4 bit image
88
print("Gray image (4 bits per sample) ...\n");
89
testReadWrite( 'input_gray_4bit.tiff',
90
'output_gray_4bit.tiff',
92
'45c0655a417852480336d5e12d7bb16b9647d911b11589e9d000a05dd1813570' );
95
# 8) Test gray 8 bit image
98
print("Gray image (8 bits per sample) ...\n");
99
testReadWrite( 'input_gray_8bit.tiff',
100
'output_gray_8bit.tiff',
102
'00f6147d547f5a654369a5b41d18f0b44b38f9cc753c773f384808b9a18cac92' );
105
# 9) Test gray 4 bit image (with matte channel)
108
print("Gray image (4 bits per sample + matte channel) ...\n");
109
testReadWrite( 'input_gray_4bit_matte.tiff',
110
'output_gray_4bit_matte.tiff',
112
'1e4ca36f33b13d8799bcda20108d20c1a2da913c27eb7872d95a6928cb8b0b48' );
115
# 10) Test gray 8 bit image (with matte channel)
118
print("Gray image (8 bits per sample + matte channel) ...\n");
119
testReadWrite( 'input_gray_8bit_matte.tiff',
120
'output_gray_8bit_matte.tiff',
122
'70e1e096e53af6a312ec6aa54890a59b35d3c6932dfc052d6b355f62733635be' );