]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/gil/test/extension/io/tiff_file_format_test.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / gil / test / extension / io / tiff_file_format_test.cpp
1 //
2 // Copyright 2013 Christian Henning
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 //#define BOOST_TEST_MODULE tiff_file_format_test_module
9
10 #include <boost/gil/extension/io/tiff.hpp>
11
12 #include <boost/test/unit_test.hpp>
13
14 #include "paths.hpp"
15 #include "scanline_read_test.hpp"
16
17 using namespace std;
18 using namespace boost::gil;
19
20 using tag_t = tiff_tag;
21
22 BOOST_AUTO_TEST_SUITE( gil_io_tiff_tests )
23
24 #ifdef BOOST_GIL_IO_USE_TIFF_LIBTIFF_TEST_SUITE_IMAGES
25
26 template< typename Image >
27 void test_tiff_scanline_reader( string filename )
28 {
29 test_scanline_reader<Image, tag_t>( filename.c_str() );
30 }
31
32 // 73x43 2-bit minisblack gray image
33 BOOST_AUTO_TEST_CASE( two_bit_minisblack_gray_image_test )
34 {
35 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-02.tif" );
36
37 {
38 using image_t = bit_aligned_image1_type<2, gray_layout_t>::type;
39 image_t img;
40
41 read_image( filename
42 , img
43 , tag_t()
44 );
45
46 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
47 write_view( tiff_out + "test4.tif"
48 , view( img )
49 , tiff_tag()
50 );
51 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
52 }
53 }
54
55 // flower-minisblack-04.tif 73x43 4-bit minisblack gray image
56 BOOST_AUTO_TEST_CASE( four_bit_minisblack_gray_image_test )
57 {
58 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-04.tif" );
59
60 {
61 using image_t = bit_aligned_image1_type<4, gray_layout_t>::type;
62 image_t img;
63
64 read_image( filename
65 , img
66 , tag_t()
67 );
68
69 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
70 write_view( tiff_out + "test5.tif"
71 , view( img )
72 , tiff_tag()
73 );
74 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
75 }
76 }
77
78 // flower-minisblack-06.tif 73x43 6-bit minisblack gray image
79 BOOST_AUTO_TEST_CASE( six_bit_minisblack_gray_image_test )
80 {
81 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-06.tif" );
82
83 {
84 using image_t = bit_aligned_image1_type<6, gray_layout_t>::type;
85 image_t img;
86
87 read_image( filename
88 , img
89 , tag_t()
90 );
91
92 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
93 write_view( tiff_out + "test6.tif"
94 , view( img )
95 , tiff_tag()
96 );
97 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
98 }
99 }
100
101 // flower-minisblack-08.tif 73x43 8-bit minisblack gray image
102 BOOST_AUTO_TEST_CASE( eight_bit_minisblack_gray_image_test )
103 {
104 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-08.tif" );
105
106 {
107 using image_t = gray8_image_t;
108 image_t img;
109
110 read_image( filename
111 , img
112 , tag_t()
113 );
114
115 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
116 write_view( tiff_out + "test7.tif"
117 , view( img )
118 , tiff_tag()
119 );
120 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
121 }
122 }
123
124 // flower-minisblack-10.tif 73x43 10-bit minisblack gray image
125 BOOST_AUTO_TEST_CASE( ten_bit_minisblack_gray_image_test )
126 {
127 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-10.tif" );
128
129 {
130 using image_t = bit_aligned_image1_type<10, gray_layout_t>::type;
131 image_t img;
132
133 read_image( filename
134 , img
135 , tag_t()
136 );
137
138 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
139 write_view( tiff_out + "test8.tif"
140 , view( img )
141 , tiff_tag()
142 );
143 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
144 }
145 }
146
147 // flower-minisblack-12.tif 73x43 12-bit minisblack gray image
148 BOOST_AUTO_TEST_CASE( twelve_bit_minisblack_gray_image_test )
149 {
150 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-12.tif" );
151
152 {
153 using image_t = bit_aligned_image1_type<12, gray_layout_t>::type;
154 image_t img;
155
156 read_image( filename
157 , img
158 , tag_t()
159 );
160
161 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
162 write_view( tiff_out + "test9.tif"
163 , view( img )
164 , tiff_tag()
165 );
166 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
167 }
168 }
169
170 // flower-minisblack-14.tif 73x43 14-bit minisblack gray image
171 BOOST_AUTO_TEST_CASE( fourteen_bit_minisblack_gray_image_test )
172 {
173 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-14.tif" );
174
175 {
176 using image_t = bit_aligned_image1_type<14, gray_layout_t>::type;
177 image_t img;
178
179 read_image( filename
180 , img
181 , tag_t()
182 );
183
184 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
185 write_view( tiff_out + "test10.tif"
186 , view( img )
187 , tiff_tag()
188 );
189 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
190 }
191 }
192
193 // flower-minisblack-16.tif 73x43 16-bit minisblack gray image
194 BOOST_AUTO_TEST_CASE( sixteen_bit_minisblack_gray_image_test )
195 {
196 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-16.tif" );
197
198 {
199 using image_t = gray16_image_t;
200 image_t img;
201
202 read_image( filename
203 , img
204 , tag_t()
205 );
206
207 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
208 write_view( tiff_out + "test11.tif"
209 , view( img )
210 , tiff_tag()
211 );
212 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
213 }
214 }
215
216 // flower-minisblack-24.tif 73x43 24-bit minisblack gray image
217 BOOST_AUTO_TEST_CASE( twentyfour_bit_minisblack_gray_image_test )
218 {
219 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-24.tif" );
220
221 {
222 using image_t = bit_aligned_image1_type<24, gray_layout_t>::type;
223 image_t img;
224
225 read_image( filename
226 , img
227 , tag_t()
228 );
229
230 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
231 write_view( tiff_out + "test12.tif"
232 , view( img )
233 , tiff_tag()
234 );
235 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
236 }
237 }
238
239 // flower-minisblack-32.tif 73x43 32-bit minisblack gray image
240 BOOST_AUTO_TEST_CASE( thirtytwo_bit_minisblack_gray_image_test )
241 {
242 std::string filename( tiff_in + "libtiffpic/depth/flower-minisblack-32.tif" );
243
244 {
245 using image_t = gray32_image_t;
246 image_t img;
247
248 read_image( filename
249 , img
250 , tag_t()
251 );
252
253 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
254 write_view( tiff_out + "test13.tif"
255 , view( img )
256 , tiff_tag()
257 );
258 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
259 }
260 }
261
262 // flower-palette-02.tif 73x43 4-entry colormapped image
263 BOOST_AUTO_TEST_CASE( four_entry_colormapped_image_test )
264 {
265 std::string filename( tiff_in + "libtiffpic/depth/flower-palette-02.tif" );
266
267 {
268 using image_t = rgb16_image_t;
269 image_t img;
270
271 read_image( filename
272 , img
273 , tag_t()
274 );
275
276 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
277 write_view( tiff_out + "test14.tif"
278 , view( img )
279 , tiff_tag()
280 );
281 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
282 }
283 }
284
285 // flower-palette-04.tif 73x43 16-entry colormapped image
286 BOOST_AUTO_TEST_CASE( sixteen_entry_colormapped_image_test )
287 {
288 std::string filename( tiff_in + "libtiffpic/depth/flower-palette-04.tif" );
289
290 {
291 using image_t = rgb16_image_t;
292 image_t img;
293
294 read_image( filename
295 , img
296 , tag_t()
297 );
298
299 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
300 write_view( tiff_out + "test15.tif"
301 , view( img )
302 , tiff_tag()
303 );
304 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
305 }
306 }
307
308 // flower-palette-08.tif 73x43 256-entry colormapped image
309 BOOST_AUTO_TEST_CASE( twohundred_twenty_five_entry_colormapped_image_test )
310 {
311 std::string filename( tiff_in + "libtiffpic/depth/flower-palette-08.tif" );
312
313 {
314 using image_t = rgb16_image_t;
315 image_t img;
316
317 read_image( filename
318 , img
319 , tag_t()
320 );
321
322 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
323 write_view( tiff_out + "test16.tif"
324 , view( img )
325 , tiff_tag()
326 );
327 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
328 }
329 }
330
331 // flower-palette-16.tif 73x43 65536-entry colormapped image
332 BOOST_AUTO_TEST_CASE( sixtyfive_thousand_entry_colormapped_image_test )
333 {
334 std::string filename( tiff_in + "libtiffpic/depth/flower-palette-16.tif" );
335
336 {
337 using image_t = rgb16_image_t;
338 image_t img;
339
340 read_image( filename
341 , img
342 , tag_t()
343 );
344
345 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
346 write_view( tiff_out + "test17.tif"
347 , view( img )
348 , tiff_tag()
349 );
350 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
351 }
352 }
353
354 // flower-rgb-contig-02.tif 73x43 2-bit contiguous RGB image
355 BOOST_AUTO_TEST_CASE( two_bit_contiguous_RGB_image_test )
356 {
357 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-02.tif" );
358
359 {
360 using image_t = bit_aligned_image3_type<2, 2, 2, rgb_layout_t>::type;
361 image_t img;
362
363 read_image( filename
364 , img
365 , tag_t()
366 );
367
368 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
369 write_view( tiff_out + "test18.tif"
370 , view( img )
371 , tiff_tag()
372 );
373 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
374 }
375 }
376
377 // flower-rgb-contig-04.tif 73x43 4-bit contiguous RGB image
378 BOOST_AUTO_TEST_CASE( four_bit_contiguous_RGB_image_test )
379 {
380 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-04.tif" );
381
382 {
383 using image_t = bit_aligned_image3_type<4, 4, 4, rgb_layout_t>::type;
384 image_t img;
385
386 read_image( filename
387 , img
388 , tag_t()
389 );
390
391 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
392 write_view( tiff_out + "test19.tif"
393 , view( img )
394 , tiff_tag()
395 );
396 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
397 }
398 }
399
400 // flower-rgb-contig-08.tif 73x43 8-bit contiguous RGB image
401 BOOST_AUTO_TEST_CASE( eight_bit_contiguous_RGB_image_test )
402 {
403 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-08.tif" );
404
405 {
406 using image_t = rgb8_image_t;
407 image_t img;
408
409 read_image( filename
410 , img
411 , tag_t()
412 );
413
414 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
415 write_view( tiff_out + "test20.tif"
416 , view( img )
417 , tiff_tag()
418 );
419 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
420 }
421 }
422
423 // flower-rgb-contig-10.tif 73x43 10-bit contiguous RGB image
424 BOOST_AUTO_TEST_CASE( ten_bit_contiguous_RGB_image_test )
425 {
426 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-10.tif" );
427
428 {
429 using image_t = bit_aligned_image3_type<10, 10, 10, rgb_layout_t>::type;
430 image_t img;
431
432 read_image( filename
433 , img
434 , tag_t()
435 );
436
437 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
438 write_view( tiff_out + "test21.tif"
439 , view( img )
440 , tiff_tag()
441 );
442 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
443 }
444 }
445
446 // flower-rgb-contig-12.tif 73x43 12-bit contiguous RGB image
447 BOOST_AUTO_TEST_CASE( twelve_bit_contiguous_RGB_image_test )
448 {
449 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-12.tif" );
450
451 {
452 using image_t = bit_aligned_image3_type<12, 12, 12, rgb_layout_t>::type;
453 image_t img;
454
455 read_image( filename
456 , img
457 , tag_t()
458 );
459
460 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
461 write_view( tiff_out + "test22.tif"
462 , view( img )
463 , tiff_tag()
464 );
465 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
466 }
467 }
468
469 // flower-rgb-contig-14.tif 73x43 14-bit contiguous RGB image
470 BOOST_AUTO_TEST_CASE( fourteen_bit_contiguous_RGB_image_test )
471 {
472 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-14.tif" );
473
474 {
475 using image_t = bit_aligned_image3_type<14, 14, 14, rgb_layout_t>::type;
476 image_t img;
477
478 read_image( filename
479 , img
480 , tag_t()
481 );
482
483 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
484 write_view( tiff_out + "test23.tif"
485 , view( img )
486 , tiff_tag()
487 );
488 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
489 }
490 }
491
492 // flower-rgb-contig-16.tif 73x43 16-bit contiguous RGB image
493 BOOST_AUTO_TEST_CASE( sixteen_bit_contiguous_RGB_image_test )
494 {
495 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-16.tif" );
496
497 {
498 using image_t = rgb16_image_t;
499 image_t img;
500
501 read_image( filename
502 , img
503 , tag_t()
504 );
505
506 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
507 write_view( tiff_out + "test24.tif"
508 , view( img )
509 , tiff_tag()
510 );
511 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
512 }
513 }
514
515 // flower-rgb-contig-24.tif 73x43 24-bit contiguous RGB image
516 BOOST_AUTO_TEST_CASE( twenty_four_bit_contiguous_RGB_image_test )
517 {
518 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-24.tif" );
519
520 {
521 using image_t = bit_aligned_image3_type<24, 24, 24, rgb_layout_t>::type;
522 image_t img;
523
524 read_image( filename
525 , img
526 , tag_t()
527 );
528
529 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
530 write_view( tiff_out + "test25.tif"
531 , view( img )
532 , tiff_tag()
533 );
534 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
535 }
536 }
537
538 // flower-rgb-contig-32.tif 73x43 32-bit contiguous RGB image
539 BOOST_AUTO_TEST_CASE( thirty_two_bit_contiguous_RGB_image_test )
540 {
541 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-contig-32.tif" );
542
543 {
544 using image_t = rgb32_image_t;
545 image_t img;
546
547 read_image( filename
548 , img
549 , tag_t()
550 );
551
552 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
553 write_view( tiff_out + "test26.tif"
554 , view( img )
555 , tiff_tag()
556 );
557 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
558 }
559 }
560
561 // flower-rgb-planar-02.tif 73x43 2-bit seperated RGB image
562 BOOST_AUTO_TEST_CASE( two_bit_seperated_RGB_image_test )
563 {
564 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-02.tif" );
565
566 {
567 using image_t = bit_aligned_image3_type<2, 2, 2, rgb_layout_t>::type;
568 image_t img;
569
570 read_image( filename
571 , img
572 , tag_t()
573 );
574
575 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
576 write_view( tiff_out + "test27.tif"
577 , view( img )
578 , tiff_tag()
579 );
580 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
581 }
582 }
583
584 // flower-rgb-planar-04.tif 73x43 4-bit seperated RGB image
585 BOOST_AUTO_TEST_CASE( four_bit_seperated_RGB_image_test )
586 {
587 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-04.tif" );
588
589 {
590 using image_t = bit_aligned_image3_type<4, 4, 4, rgb_layout_t>::type;
591 image_t img;
592
593 read_image( filename
594 , img
595 , tag_t()
596 );
597
598 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
599 write_view( tiff_out + "test28.tif"
600 , view( img )
601 , tiff_tag()
602 );
603 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
604 }
605 }
606
607 // flower-rgb-planar-08.tif 73x43 8-bit seperated RGB image
608 BOOST_AUTO_TEST_CASE( eight_bit_seperated_RGB_image_test )
609 {
610 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-08.tif" );
611
612 {
613 using image_t = rgb8_planar_image_t;
614 image_t img;
615
616 read_image( filename
617 , img
618 , tag_t()
619 );
620
621 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
622 write_view( tiff_out + "test29.tif"
623 , view( img )
624 , tiff_tag()
625 );
626 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
627 }
628 }
629
630 // flower-rgb-planar-10.tif 73x43 10-bit seperated RGB image
631 BOOST_AUTO_TEST_CASE( ten_bit_seperated_RGB_image_test )
632 {
633 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-10.tif" );
634
635 {
636 using image_t = bit_aligned_image3_type<10, 10, 10, rgb_layout_t>::type;
637 image_t img;
638
639 read_image( filename
640 , img
641 , tag_t()
642 );
643
644 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
645 write_view( tiff_out + "test30.tif"
646 , view( img )
647 , tiff_tag()
648 );
649 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
650 }
651 }
652
653 // flower-rgb-planar-12.tif 73x43 12-bit seperated RGB image
654 BOOST_AUTO_TEST_CASE( twelve_bit_seperated_RGB_image_test )
655 {
656 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-12.tif" );
657
658 {
659 using image_t = bit_aligned_image3_type<12, 12, 12, rgb_layout_t>::type;
660 image_t img;
661
662 read_image( filename
663 , img
664 , tag_t()
665 );
666
667 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
668 write_view( tiff_out + "test31.tif"
669 , view( img )
670 , tiff_tag()
671 );
672 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
673 }
674 }
675
676 // flower-rgb-planar-14.tif 73x43 14-bit seperated RGB image
677 BOOST_AUTO_TEST_CASE( fourteen_bit_seperated_RGB_image_test )
678 {
679 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-14.tif" );
680
681 {
682 using image_t = bit_aligned_image3_type<14, 14, 14, rgb_layout_t>::type;
683 image_t img;
684
685 read_image( filename
686 , img
687 , tag_t()
688 );
689
690 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
691 write_view( tiff_out + "test32.tif"
692 , view( img )
693 , tiff_tag()
694 );
695 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
696 }
697 }
698
699 // flower-rgb-planar-16.tif 73x43 16-bit seperated RGB image
700 BOOST_AUTO_TEST_CASE( sixteen_bit_seperated_RGB_image_test )
701 {
702 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-16.tif" );
703
704 {
705 using image_t = rgb16_planar_image_t;
706 image_t img;
707
708 read_image( filename
709 , img
710 , tag_t()
711 );
712
713 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
714 write_view( tiff_out + "test33.tif"
715 , view( img )
716 , tiff_tag()
717 );
718 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
719 }
720 }
721
722 // flower-rgb-planar-24.tif 73x43 24-bit seperated RGB image
723 BOOST_AUTO_TEST_CASE( twenty_four_bit_seperated_RGB_image_test )
724 {
725 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-24.tif" );
726
727 {
728 using image_t = bit_aligned_image3_type<24, 24, 24, rgb_layout_t>::type;
729 image_t img;
730
731 read_image( filename
732 , img
733 , tag_t()
734 );
735
736 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
737 write_view( tiff_out + "test34.tif"
738 , view( img )
739 , tiff_tag()
740 );
741 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
742 }
743 }
744
745 // flower-rgb-planar-32.tif 73x43 32-bit seperated RGB image
746 BOOST_AUTO_TEST_CASE( thirty_two_bit_seperated_RGB_image_test )
747 {
748 std::string filename( tiff_in + "libtiffpic/depth/flower-rgb-planar-32.tif" );
749
750 {
751 using image_t = rgb32_planar_image_t;
752 image_t img;
753
754 read_image( filename
755 , img
756 , tag_t()
757 );
758
759 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
760 write_view( tiff_out + "test35.tif"
761 , view( img )
762 , tiff_tag()
763 );
764 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
765 }
766 }
767
768 // flower-separated-contig-08.tif 73x43 8-bit contiguous CMYK image
769 BOOST_AUTO_TEST_CASE( eight_bit_contiguous_CMYK_image_test )
770 {
771 std::string filename( tiff_in + "libtiffpic/depth/flower-separated-contig-08.tif" );
772
773 {
774 using image_t = cmyk8_image_t;
775 image_t img;
776
777 read_image( filename
778 , img
779 , tag_t()
780 );
781
782 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
783 write_view( tiff_out + "test36.tif"
784 , view( img )
785 , tiff_tag()
786 );
787 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
788 }
789 }
790
791 // flower-separated-contig-16.tif 73x43 16-bit contiguous CMYK image
792 BOOST_AUTO_TEST_CASE( sixteen_bit_contiguous_CMYK_image_test )
793 {
794 std::string filename( tiff_in + "libtiffpic/depth/flower-separated-contig-16.tif" );
795
796 {
797 using image_t = cmyk16_image_t;
798 image_t img;
799
800 read_image( filename
801 , img
802 , tag_t()
803 );
804
805 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
806 write_view( tiff_out + "test37.tif"
807 , view( img )
808 , tiff_tag()
809 );
810 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
811 }
812 }
813
814 // flower-separated-planar-08.tif 73x43 8-bit separated CMYK image
815 BOOST_AUTO_TEST_CASE( eight_bit_separated_CMYK_image_test )
816 {
817 std::string filename( tiff_in + "libtiffpic/depth/flower-separated-planar-08.tif" );
818
819 {
820 using image_t = cmyk8_planar_image_t;
821 image_t img;
822
823 read_image( filename
824 , img
825 , tag_t()
826 );
827
828 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
829 write_view( tiff_out + "test38.tif"
830 , view( img )
831 , tiff_tag()
832 );
833 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
834 }
835 }
836
837 // flower-separated-planar-16.tif 73x43 16-bit separated CMYK image
838 BOOST_AUTO_TEST_CASE( sixteen_bit_separated_CMYK_image_test )
839 {
840 std::string filename( tiff_in + "libtiffpic/depth/flower-separated-planar-16.tif" );
841
842 {
843 using image_t = cmyk16_planar_image_t;
844 image_t img;
845
846 read_image( filename
847 , img
848 , tag_t()
849 );
850
851 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
852 write_view( tiff_out + "test39.tif"
853 , view( img )
854 , tiff_tag()
855 );
856 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
857 }
858 }
859
860 #endif // BOOST_GIL_IO_USE_TIFF_LIBTIFF_TEST_SUITE_IMAGES
861
862 #ifdef BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
863
864 BOOST_AUTO_TEST_CASE( tiger_separated_strip_contig_08 )
865 {
866 std::string filename( tiff_in_GM + "tiger-separated-strip-contig-08.tif" );
867
868 {
869 using image_t = cmyk8_planar_image_t;
870 image_t img;
871
872 read_image( filename
873 , img
874 , tag_t()
875 );
876
877 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
878 write_view( tiff_out + "test40.tif"
879 , view( img )
880 , tiff_tag()
881 );
882 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
883 }
884 }
885
886 BOOST_AUTO_TEST_CASE( tiger_separated_strip_contig_16 )
887 {
888 std::string filename( tiff_in_GM + "tiger-separated-strip-contig-16.tif" );
889
890 {
891 using image_t = cmyk16_planar_image_t;
892 image_t img;
893
894 read_image( filename
895 , img
896 , tag_t()
897 );
898
899 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
900 write_view( tiff_out + "test41.tif"
901 , view( img )
902 , tiff_tag()
903 );
904 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
905 }
906 }
907
908 BOOST_AUTO_TEST_CASE( tiger_separated_strip_planar_08 )
909 {
910 std::string filename( tiff_in_GM + "tiger-separated-strip-planar-08.tif" );
911
912 {
913 using image_t = cmyk8_planar_image_t;
914 image_t img;
915
916 read_image( filename
917 , img
918 , tag_t()
919 );
920
921 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
922 write_view( tiff_out + "test42.tif"
923 , view( img )
924 , tiff_tag()
925 );
926 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
927 }
928 }
929
930 BOOST_AUTO_TEST_CASE( tiger_separated_strip_planar_16 )
931 {
932 std::string filename( tiff_in_GM + "tiger-separated-strip-planar-16.tif" );
933
934 {
935 using image_t = cmyk16_planar_image_t;
936 image_t img;
937
938 read_image( filename
939 , img
940 , tag_t()
941 );
942
943 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
944 write_view( tiff_out + "test43.tif"
945 , view( img )
946 , tiff_tag()
947 );
948 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
949 }
950 }
951
952 #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
953
954 BOOST_AUTO_TEST_SUITE_END()