cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | #!/usr/bin/perl |
| 2 | # Copyright 1999-2009 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 | # http://www.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 | # |
| 18 | BEGIN { $| = 1; $test=1, print "1..71\n"; } |
| 19 | END {print "not ok 1\n" unless $loaded;} |
| 20 | use Image::Magick; |
| 21 | $loaded=1; |
| 22 | |
| 23 | require 't/subroutines.pl'; |
| 24 | |
| 25 | chdir 't' || die 'Cd failed'; |
| 26 | |
| 27 | # Determine if QuantumMagick is defined |
| 28 | $image=Image::Magick->new; |
| 29 | my $depth = $image->Get('depth'); |
| 30 | |
| 31 | testSetAttribute('input.miff','adjoin','True'); |
| 32 | |
| 33 | ++$test; |
| 34 | testSetAttribute('input.miff','adjoin','False'); |
| 35 | |
| 36 | ++$test; |
| 37 | testSetAttribute('input.miff','antialias','True'); |
| 38 | |
| 39 | ++$test; |
| 40 | testSetAttribute('input.miff','antialias','False'); |
| 41 | |
| 42 | ++$test; |
| 43 | testSetAttribute('input.miff','compression','None'); |
| 44 | |
| 45 | ++$test; |
| 46 | testSetAttribute('input.miff','compression','JPEG'); |
| 47 | |
| 48 | ++$test; |
| 49 | testSetAttribute('input.miff','compression','LZW'); |
| 50 | |
| 51 | ++$test; |
| 52 | testSetAttribute('input.miff','compression','RLE'); |
| 53 | |
| 54 | ++$test; |
| 55 | testSetAttribute('input.miff','compression','Zip'); |
| 56 | |
| 57 | ++$test; |
| 58 | testSetAttribute('input.miff','density','72x72'); |
| 59 | |
| 60 | ++$test; |
| 61 | testSetAttribute('input.miff','dispose','Undefined'); |
| 62 | |
| 63 | ++$test; |
| 64 | testSetAttribute('input.miff','dispose','None'); |
| 65 | |
| 66 | ++$test; |
| 67 | testSetAttribute('input.miff','dispose','Background'); |
| 68 | |
| 69 | ++$test; |
| 70 | testSetAttribute('input.miff','dispose','Previous'); |
| 71 | |
| 72 | ++$test; |
| 73 | testSetAttribute('input.miff','delay',100); |
| 74 | |
| 75 | ++$test; |
| 76 | testSetAttribute('input.miff','dither','True'); |
| 77 | |
| 78 | ++$test; |
| 79 | testSetAttribute('input.miff','dither','False'); |
| 80 | |
| 81 | ++$test; |
| 82 | testSetAttribute('input.miff','display','bogus:0.0'); |
| 83 | |
| 84 | ++$test; |
| 85 | testSetAttribute('input.miff','filename','bogus.jpg'); |
| 86 | |
| 87 | ++$test; |
| 88 | testSetAttribute('input.miff','font',q/-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-*/); |
| 89 | |
| 90 | ++$test; |
| 91 | testSetAttribute('input.miff','iterations',10); |
| 92 | |
| 93 | ++$test; |
| 94 | testSetAttribute('input.miff','interlace','None'); |
| 95 | |
| 96 | ++$test; |
| 97 | testSetAttribute('input.miff','interlace','Line'); |
| 98 | |
| 99 | ++$test; |
| 100 | testSetAttribute('input.miff','interlace','Plane'); |
| 101 | |
| 102 | ++$test; |
| 103 | testSetAttribute('input.miff','interlace','Partition'); |
| 104 | |
| 105 | ++$test; |
| 106 | testSetAttribute('input.miff','loop',100); |
| 107 | |
| 108 | ++$test; |
| 109 | testSetAttribute('input.miff','magick','TIFF'); |
| 110 | |
| 111 | ++$test; |
| 112 | testSetAttribute('input.miff','monochrome','True'); |
| 113 | |
| 114 | ++$test; |
| 115 | testSetAttribute('input.miff','monochrome','False'); |
| 116 | |
| 117 | ++$test; |
| 118 | testSetAttribute('input.miff','page','595x842+0+0'); |
| 119 | |
| 120 | ++$test; |
| 121 | testSetAttribute('input.miff','pointsize',12); |
| 122 | |
| 123 | ++$test; |
| 124 | testSetAttribute('input.miff','preview','Rotate'); |
| 125 | |
| 126 | ++$test; |
| 127 | testSetAttribute('input.miff','preview','Shear'); |
| 128 | |
| 129 | ++$test; |
| 130 | testSetAttribute('input.miff','preview','Roll'); |
| 131 | |
| 132 | ++$test; |
| 133 | testSetAttribute('input.miff','preview','Hue'); |
| 134 | |
| 135 | ++$test; |
| 136 | testSetAttribute('input.miff','preview','Saturation'); |
| 137 | |
| 138 | ++$test; |
| 139 | testSetAttribute('input.miff','preview','Brightness'); |
| 140 | |
| 141 | ++$test; |
| 142 | testSetAttribute('input.miff','preview','JPEG'); |
| 143 | |
| 144 | ++$test; |
| 145 | testSetAttribute('input.miff','preview','Spiff'); |
| 146 | |
| 147 | ++$test; |
| 148 | testSetAttribute('input.miff','preview','Dull'); |
| 149 | |
| 150 | ++$test; |
| 151 | testSetAttribute('input.miff','preview','Grayscale'); |
| 152 | |
| 153 | ++$test; |
| 154 | testSetAttribute('input.miff','preview','Quantize'); |
| 155 | |
| 156 | ++$test; |
| 157 | testSetAttribute('input.miff','preview','Despeckle'); |
| 158 | |
| 159 | ++$test; |
| 160 | testSetAttribute('input.miff','preview','ReduceNoise'); |
| 161 | |
| 162 | ++$test; |
| 163 | testSetAttribute('input.miff','preview','AddNoise'); |
| 164 | |
| 165 | ++$test; |
| 166 | testSetAttribute('input.miff','preview','Sharpen'); |
| 167 | |
| 168 | ++$test; |
| 169 | testSetAttribute('input.miff','preview','Blur'); |
| 170 | |
| 171 | ++$test; |
| 172 | testSetAttribute('input.miff','preview','Threshold'); |
| 173 | |
| 174 | ++$test; |
| 175 | testSetAttribute('input.miff','preview','EdgeDetect'); |
| 176 | |
| 177 | ++$test; |
| 178 | testSetAttribute('input.miff','preview','Spread'); |
| 179 | |
| 180 | ++$test; |
| 181 | testSetAttribute('input.miff','preview','Solarize'); |
| 182 | |
| 183 | ++$test; |
| 184 | testSetAttribute('input.miff','preview','Shade'); |
| 185 | |
| 186 | ++$test; |
| 187 | testSetAttribute('input.miff','preview','Raise'); |
| 188 | |
| 189 | ++$test; |
| 190 | testSetAttribute('input.miff','preview','Segment'); |
| 191 | |
| 192 | ++$test; |
| 193 | testSetAttribute('input.miff','preview','Solarize'); |
| 194 | |
| 195 | ++$test; |
| 196 | testSetAttribute('input.miff','preview','Swirl'); |
| 197 | |
| 198 | ++$test; |
| 199 | testSetAttribute('input.miff','preview','Implode'); |
| 200 | |
| 201 | ++$test; |
| 202 | testSetAttribute('input.miff','preview','Wave'); |
| 203 | |
| 204 | ++$test; |
| 205 | testSetAttribute('input.miff','preview','OilPaint'); |
| 206 | |
| 207 | ++$test; |
| 208 | testSetAttribute('input.miff','preview','Charcoal'); |
| 209 | |
| 210 | ++$test; |
| 211 | testSetAttribute('input.miff','quality',25); |
| 212 | |
| 213 | ++$test; |
| 214 | testSetAttribute('input.miff','scene',5); |
| 215 | |
| 216 | ++$test; |
| 217 | testSetAttribute('input.miff','subimage',9); |
| 218 | |
| 219 | ++$test; |
| 220 | testSetAttribute('input.miff','subrange',16); |
| 221 | |
| 222 | ++$test; |
| 223 | testSetAttribute('input.miff','server','mymachine:0.0'); |
| 224 | |
| 225 | ++$test; |
| 226 | testSetAttribute('input.miff','size','25x25'); |
| 227 | |
| 228 | ++$test; |
| 229 | testSetAttribute('input.miff','size','25x25'); |
| 230 | |
| 231 | # I have no idea what this does |
| 232 | ++$test; |
| 233 | testSetAttribute('input.miff','tile','some value'); |
| 234 | |
| 235 | ++$test; |
| 236 | testSetAttribute('input.miff','texture','granite:'); |
| 237 | |
| 238 | ++$test; |
| 239 | testSetAttribute('input.miff','verbose','True'); |
| 240 | |
| 241 | ++$test; |
| 242 | testSetAttribute('input.miff','verbose','False'); |
| 243 | |