2 # Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
3 # dedicated to making software imaging solutions freely available.
5 # You may not use this file except in compliance with the License. You may
6 # obtain a copy of the License at
8 # http://www.imagemagick.org/script/license.php
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.
16 # Test writing formats supported directly by ImageMagick
19 BEGIN { $| = 1; $test=1; print "1..32\n"; }
20 END {print "not ok $test\n" unless $loaded;}
24 require 't/subroutines.pl';
26 chdir 't' || die 'Cd failed';
28 print("AVS X image file ...\n");
29 testReadWrite( 'AVS:input.avs',
32 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
34 print("Microsoft Windows bitmap image file ...\n");
36 testReadWrite( 'BMP:input.bmp',
39 '5a25065144213cd0230b7572bd9aef0e447c23a0622193a94ae62c9895c44bf7');
41 print("Microsoft Windows 24-bit bitmap image file ...\n");
43 testReadWrite( 'BMP:input.bmp24',
46 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
49 print("ZSoft IBM PC multi-page Paintbrush file ...\n");
51 testReadWrite( 'DCX:input.dcx',
54 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
56 print("Microsoft Windows 3.X DIB file ...\n");
58 testReadWrite( 'DIB:input.dib',
61 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
63 print("Flexible Image Transport System ...\n");
65 testReadWrite( 'FITS:input.fits',
68 '8365d1242126cb96856a9b4ade0bfad06900b4f42c3f05d589030c1240f37827' );
70 print("CompuServe graphics interchange format ...\n");
72 testReadWrite( 'GIF:input.gif',
75 '5a25065144213cd0230b7572bd9aef0e447c23a0622193a94ae62c9895c44bf7');
77 print("CompuServe graphics interchange format (1987) ...\n");
79 testReadWrite( 'GIF87:input.gif87',
82 '0138e1e5c9a7ed1604ec5bbe8c22378b84fcd9abb8c36e984b051f9efc14d54e');
84 print("Magick image file format ...\n");
86 testReadWrite( 'MIFF:input.miff',
89 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
91 print("MTV Raytracing image format ...\n");
93 testReadWrite( 'MTV:input.mtv',
96 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
98 print("Portable bitmap format (black and white), ASCII format ...\n");
100 testReadWrite( 'PBM:input_p1.pbm',
102 q/compression=>'None'/,
103 '83175f7bcc43fb71212dee254c85e355c18bcd25f35d3b9caba66fff7341fa64');
105 print("Portable bitmap format (black and white), binary format ...\n");
107 testReadWrite( 'PBM:input_p4.pbm',
110 '83175f7bcc43fb71212dee254c85e355c18bcd25f35d3b9caba66fff7341fa64');
112 print("ZSoft IBM PC Paintbrush file ...\n");
114 testReadWrite( 'PCX:input.pcx',
117 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
119 print("Portable graymap format (gray scale), ASCII format ...\n");
121 testReadWrite( 'PGM:input_p2.pgm',
123 q/compression=>'None'/,
124 '39bfd79b101f69842dfd0ee9dec46569147a22dc1557b84fadb60adb5b873f37');
126 print("Apple Macintosh QuickDraw/PICT file ...\n");
128 testReadWrite( 'PICT:input.pict',
131 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
133 print("Portable pixmap format (color), ASCII format ...\n");
135 testReadWrite( 'PPM:input_p3.ppm',
137 q/compression=>'None'/,
138 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
140 print("Portable graymap format (gray scale), binary format ...\n");
142 testReadWrite( 'PGM:input_p5.pgm',
145 '39bfd79b101f69842dfd0ee9dec46569147a22dc1557b84fadb60adb5b873f37');
147 print("Portable pixmap format (color), binary format ...\n");
149 testReadWrite( 'PPM:input_p6.ppm',
152 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
154 print("Adobe Photoshop bitmap file ...\n");
156 testReadWrite( 'PSD:input.psd',
159 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7' );
161 print("Irix RGB image file ...\n");
163 testReadWrite( 'SGI:input.sgi',
166 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
168 print("SUN 1-bit Rasterfile ...\n");
170 testReadWrite( 'SUN:input.im1',
173 '8922c9505ece06295a015d23e28da3727c3bc7ab22593f98e0fc8784aa16d0c2');
175 print("SUN 8-bit Rasterfile ...\n");
177 testReadWrite( 'SUN:input.im8',
180 'd28c7104a30c8986c34b98a4209de5d4b8a79911a9b5c46037e62c8a2063a09c');
182 print("SUN True-Color Rasterfile ...\n");
184 testReadWrite( 'SUN:input.im24',
187 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7',
188 'c44fd9695c066798a9dc010010cdff2921b95b67753164f3179352bafee98d10',
189 '5a5f94a626ee1945ab1d4d2a621aeec4982cccb94e4d68afe4c784abece91b3e');
191 print("Truevision Targa image file ...\n");
193 testReadWrite( 'TGA:input.tga',
196 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7');
198 print("Khoros Visualization image file ...\n");
200 testReadWrite( 'VIFF:input.viff',
203 '7f2c98e7ce98983509580eaeb3bb6a420e3f358b39fcec4cdd96982ae1e21882',
204 'ede99c6be1a9d82cd2f37b87dfd7cd5369391ff42b566ff1d5491f58e60637cb',
205 'aa4a6154f3c314d99c257280faf9097f3863a132ec8bddbc3b68209ce2c19487');
207 print("WBMP (Wireless Bitmap (level 0) image) ...\n");
209 testReadWrite( 'WBMP:input.wbmp',
212 'b7b682361e82d9d7cf2bed34f76af87576b97590b12d76b961104e53ee18ee74',
213 '1a3a1f20e9126794a0347d4920c497b5b203767d1a507db728901dc66874ea0d',
214 'd818195f73f8d5db624c8f87a706bbcb3179dbb7a7f08abbad5b12cd97de8fe6');
216 print("X Windows system bitmap (black and white only) ...\n");
218 testReadWrite( 'XBM:input.xbm',
221 '4cc91a24ddcbe4a9563b1ca063f765ec1ca4514cc3e3ba3e710f1226e49a8dd5');
223 print("X Windows system pixmap file (color) ...\n");
225 testReadWrite( 'XPM:input.xpm',
228 'fa51c37680393251b7011d1825df7a5ed4e0f78168afb4d6d5c59aa4d45ade12');
230 print("CMYK format ...\n");
232 testReadWriteSized( 'CMYK:input_70x46.cmyk',
233 'CMYK:output_70x46.cmyk',
237 '1d9a2a8b39e8fc584ce24166e4e8a1544a5302b90fd84ff069d0d01c525f3462');
239 print("GRAY format ...\n");
241 testReadWriteSized( 'GRAY:input_70x46.gray',
242 'GRAY:output_70x46.gray',
246 '8365d1242126cb96856a9b4ade0bfad06900b4f42c3f05d589030c1240f37827' );
248 print("RGB format ...\n");
250 testReadWriteSized( 'RGB:input_70x46.rgb',
251 'RGB:output_70x46.rgb',
255 'a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7' );
258 print("RGBA format ...\n");
260 testReadWriteSized( 'RGBA:input_70x46.rgba',
261 'RGBA:output_70x46.rgba',
265 '1252b2f3facc0fb67fcfacfc01938843566acbb9480bbe077a4c6f6af528eb4e' );