~ubuntu-branches/ubuntu/intrepid/graphicsmagick/intrepid

« back to all changes in this revision

Viewing changes to PerlMagick/t/tiff/write.t

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2006-05-06 16:28:08 UTC
  • Revision ID: james.westby@ubuntu.com-20060506162808-vt2ni3r5nytcszms
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl
 
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
 
5
#
 
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.
 
9
#
 
10
#
 
11
# Test writing TIFF images
 
12
#
 
13
# Contributed by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
 
14
#
 
15
BEGIN { $| = 1; $test=1; print "1..10\n"; }
 
16
END {print "not ok $test\n" unless $loaded;}
 
17
 
 
18
use Graphics::Magick;
 
19
$loaded=1;
 
20
 
 
21
require 't/subroutines.pl';
 
22
 
 
23
chdir 't/tiff' || die 'Cd failed';
 
24
 
 
25
#
 
26
# 1) Test 4-bit pseudocolor image
 
27
#
 
28
print("PsuedoColor image (4 bits/sample) ...\n");
 
29
testReadWrite( 'input_16.tiff',
 
30
  'output_16.tiff',
 
31
  q//,
 
32
  'a0313f6235a3158655412e1480c2f37549d89a5cacf40abc854811af1b757159');
 
33
 
 
34
#
 
35
# 2) Test 8-bit pseudocolor image
 
36
#
 
37
++$test;
 
38
print("PsuedoColor image (8 bits/sample) ...\n");
 
39
testReadWrite( 'input_256.tiff',
 
40
  'output_256.tiff',
 
41
  q//,
 
42
  'a570df6d4c214d08bccaaee856f617883fee4f96494af6ef5e25c76d86ea0e0a');
 
43
 
 
44
#
 
45
# 3) Test 4-bit pseudocolor + matte channel image
 
46
#
 
47
++$test;
 
48
print("PsuedoColor image (4 bits/sample + matte channel) ...\n");
 
49
testReadWrite( 'input_16_matte.tiff',
 
50
  'output_16_matte.tiff',
 
51
  q//,
 
52
  '631c0997280217f3f430336513f1e51fe03e04f552d49a848449a438c100aa20');
 
53
 
 
54
#
 
55
# 4) Test 8-bit pseudocolor + matte channel image
 
56
#
 
57
++$test;
 
58
print("PsuedoColor image (8 bits/sample + matte channel) ...\n");
 
59
testReadWrite( 'input_256_matte.tiff',
 
60
  'output_256_matte.tiff',
 
61
  q//,
 
62
  'a3f865320dc8b7953850babbd22d468d821c0103cc14063d6459159506a910d6');
 
63
 
 
64
#
 
65
# 5) Test truecolor image
 
66
#
 
67
++$test;
 
68
print("TrueColor image (8 bits/sample) ...\n");
 
69
testReadWrite( 'input_truecolor.tiff',
 
70
  'output_truecolor.tiff',
 
71
  q/quality=>55/,
 
72
  '326599218925e7aa27c735d482332744cccf41f460a1ba2d276a2d172f2b3de0' );
 
73
 
 
74
#
 
75
# 6) Test monochrome image
 
76
#
 
77
++$test;
 
78
print("Gray image (1 bit per sample) ...\n");
 
79
testReadWrite(  'input_mono.tiff',
 
80
  'output_mono.tiff',
 
81
  q//,
 
82
  '2b48bcf7d93cc31a8deb3026d872f1bb0a300b0f4e177423e5301adc638179e4' );
 
83
 
 
84
#
 
85
# 7) Test gray 4 bit image
 
86
#
 
87
++$test;
 
88
print("Gray image (4 bits per sample) ...\n");
 
89
testReadWrite(  'input_gray_4bit.tiff',
 
90
  'output_gray_4bit.tiff',
 
91
  q//,
 
92
  '45c0655a417852480336d5e12d7bb16b9647d911b11589e9d000a05dd1813570' );
 
93
 
 
94
#
 
95
# 8) Test gray 8 bit image
 
96
#
 
97
++$test;
 
98
print("Gray image (8 bits per sample) ...\n");
 
99
testReadWrite(  'input_gray_8bit.tiff',
 
100
  'output_gray_8bit.tiff',
 
101
  q//,
 
102
  '00f6147d547f5a654369a5b41d18f0b44b38f9cc753c773f384808b9a18cac92' );
 
103
 
 
104
#
 
105
# 9) Test gray 4 bit image (with matte channel)
 
106
#
 
107
++$test;
 
108
print("Gray image (4 bits per sample + matte channel) ...\n");
 
109
testReadWrite(  'input_gray_4bit_matte.tiff',
 
110
  'output_gray_4bit_matte.tiff',
 
111
  q//,
 
112
  '1e4ca36f33b13d8799bcda20108d20c1a2da913c27eb7872d95a6928cb8b0b48' );
 
113
 
 
114
#
 
115
# 10) Test gray 8 bit image (with matte channel)
 
116
#
 
117
++$test;
 
118
print("Gray image (8 bits per sample + matte channel) ...\n");
 
119
testReadWrite(  'input_gray_8bit_matte.tiff',
 
120
  'output_gray_8bit_matte.tiff',
 
121
  q//,
 
122
  '70e1e096e53af6a312ec6aa54890a59b35d3c6932dfc052d6b355f62733635be' );