• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/perl
2#  Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
3#  dedicated to making software imaging solutions freely available.
4#
5#  You may not use this file except in compliance with the License.  You may
6#  obtain a copy of the License at
7#
8#    https://imagemagick.org/script/license.php
9#
10#  Unless required by applicable law or agreed to in writing, software
11#  distributed under the License is distributed on an "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#  See the License for the specific language governing permissions and
14#  limitations under the License.
15#
16# Test setting & getting attributes.
17#
18BEGIN { $| = 1; $test=1, print "1..71\n"; }
19END {print "not ok 1\n" unless $loaded;}
20use Image::Magick;
21$loaded=1;
22
23require 't/subroutines.pl';
24
25chdir 't' || die 'Cd failed';
26
27# Determine if QuantumMagick is defined
28$image=Image::Magick->new;
29my $depth = $image->Get('depth');
30
31testSetAttribute('input.miff','adjoin','True');
32
33++$test;
34testSetAttribute('input.miff','adjoin','False');
35
36++$test;
37testSetAttribute('input.miff','antialias','True');
38
39++$test;
40testSetAttribute('input.miff','antialias','False');
41
42++$test;
43testSetAttribute('input.miff','compression','None');
44
45++$test;
46testSetAttribute('input.miff','compression','JPEG');
47
48++$test;
49testSetAttribute('input.miff','compression','LZW');
50
51++$test;
52testSetAttribute('input.miff','compression','RLE');
53
54++$test;
55testSetAttribute('input.miff','compression','Zip');
56
57++$test;
58testSetAttribute('input.miff','density','72x72');
59
60++$test;
61testSetAttribute('input.miff','dispose','Undefined');
62
63++$test;
64testSetAttribute('input.miff','dispose','None');
65
66++$test;
67testSetAttribute('input.miff','dispose','Background');
68
69++$test;
70testSetAttribute('input.miff','dispose','Previous');
71
72++$test;
73testSetAttribute('input.miff','delay',100);
74
75++$test;
76testSetAttribute('input.miff','dither','True');
77
78++$test;
79testSetAttribute('input.miff','dither','False');
80
81++$test;
82testSetAttribute('input.miff','display','bogus:0.0');
83
84++$test;
85testSetAttribute('input.miff','filename','bogus.jpg');
86
87++$test;
88testSetAttribute('input.miff','font',q/-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-*/);
89
90++$test;
91testSetAttribute('input.miff','iterations',10);
92
93++$test;
94testSetAttribute('input.miff','interlace','None');
95
96++$test;
97testSetAttribute('input.miff','interlace','Line');
98
99++$test;
100testSetAttribute('input.miff','interlace','Plane');
101
102++$test;
103testSetAttribute('input.miff','interlace','Partition');
104
105++$test;
106testSetAttribute('input.miff','loop',100);
107
108++$test;
109testSetAttribute('input.miff','magick','TIFF');
110
111++$test;
112testSetAttribute('input.miff','monochrome','True');
113
114++$test;
115testSetAttribute('input.miff','monochrome','False');
116
117++$test;
118testSetAttribute('input.miff','page','595x842+0+0');
119
120++$test;
121testSetAttribute('input.miff','pointsize',12);
122
123++$test;
124testSetAttribute('input.miff','preview','Rotate');
125
126++$test;
127testSetAttribute('input.miff','preview','Shear');
128
129++$test;
130testSetAttribute('input.miff','preview','Roll');
131
132++$test;
133testSetAttribute('input.miff','preview','Hue');
134
135++$test;
136testSetAttribute('input.miff','preview','Saturation');
137
138++$test;
139testSetAttribute('input.miff','preview','Brightness');
140
141++$test;
142testSetAttribute('input.miff','preview','JPEG');
143
144++$test;
145testSetAttribute('input.miff','preview','Spiff');
146
147++$test;
148testSetAttribute('input.miff','preview','Dull');
149
150++$test;
151testSetAttribute('input.miff','preview','Grayscale');
152
153++$test;
154testSetAttribute('input.miff','preview','Quantize');
155
156++$test;
157testSetAttribute('input.miff','preview','Despeckle');
158
159++$test;
160testSetAttribute('input.miff','preview','ReduceNoise');
161
162++$test;
163testSetAttribute('input.miff','preview','AddNoise');
164
165++$test;
166testSetAttribute('input.miff','preview','Sharpen');
167
168++$test;
169testSetAttribute('input.miff','preview','Blur');
170
171++$test;
172testSetAttribute('input.miff','preview','Threshold');
173
174++$test;
175testSetAttribute('input.miff','preview','EdgeDetect');
176
177++$test;
178testSetAttribute('input.miff','preview','Spread');
179
180++$test;
181testSetAttribute('input.miff','preview','Solarize');
182
183++$test;
184testSetAttribute('input.miff','preview','Shade');
185
186++$test;
187testSetAttribute('input.miff','preview','Raise');
188
189++$test;
190testSetAttribute('input.miff','preview','Segment');
191
192++$test;
193testSetAttribute('input.miff','preview','Solarize');
194
195++$test;
196testSetAttribute('input.miff','preview','Swirl');
197
198++$test;
199testSetAttribute('input.miff','preview','Implode');
200
201++$test;
202testSetAttribute('input.miff','preview','Wave');
203
204++$test;
205testSetAttribute('input.miff','preview','OilPaint');
206
207++$test;
208testSetAttribute('input.miff','preview','Charcoal');
209
210++$test;
211testSetAttribute('input.miff','quality',25);
212
213++$test;
214testSetAttribute('input.miff','scene',5);
215
216++$test;
217testSetAttribute('input.miff','subimage',9);
218
219++$test;
220testSetAttribute('input.miff','subrange',16);
221
222++$test;
223testSetAttribute('input.miff','server','mymachine:0.0');
224
225++$test;
226testSetAttribute('input.miff','size','25x25');
227
228++$test;
229testSetAttribute('input.miff','size','25x25');
230
231# I have no idea what this does
232++$test;
233testSetAttribute('input.miff','tile','some value');
234
235++$test;
236testSetAttribute('input.miff','texture','granite:');
237
238++$test;
239testSetAttribute('input.miff','verbose','True');
240
241++$test;
242testSetAttribute('input.miff','verbose','False');
243
244