blob: 83ab7eab570f2e39a3e73e42126455ef2ce68b7b [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001#!/usr/bin/perl
2#
3# Test reading JPEG images
4#
5# Contributed by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
6#
7BEGIN { $| = 1; $test=1; print "1..11\n"; }
8END {print "not ok $test\n" unless $loaded;}
9
10use Image::Magick;
11$loaded=1;
12
13require 't/subroutines.pl';
14
15chdir 't/jng' || die 'Cd failed';
16
cristyf74ca2a2013-04-07 00:27:59 +000017testReadWriteCompare( 'input_gray_idat.jng', 'gray_idat_tmp.jng', '../reference/jng/write_gray_idat.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000018++$test;
cristyf74ca2a2013-04-07 00:27:59 +000019testReadWriteCompare( 'input_gray_jdaa.jng', 'gray_jdaa_tmp.jng', '../reference/jng/write_gray_jdaa.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000020++$test;
cristyf74ca2a2013-04-07 00:27:59 +000021testReadWriteCompare( 'input_gray.jng', 'gray_tmp.jng', '../reference/jng/write_gray.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000022++$test;
cristyf74ca2a2013-04-07 00:27:59 +000023testReadWriteCompare( 'input_gray_prog_idat.jng', 'gray_prog_idat_tmp.jng', '../reference/jng/write_gray_prog_idat.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000024++$test;
cristyf74ca2a2013-04-07 00:27:59 +000025testReadWriteCompare( 'input_gray_prog_jdaa.jng', 'gray_prog_jdaa_tmp.jng', '../reference/jng/write_gray_prog_jdaa.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000026++$test;
cristyf74ca2a2013-04-07 00:27:59 +000027testReadWriteCompare( 'input_gray_prog.jng', 'gray_prog_tmp.jng', '../reference/jng/write_gray_prog.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000028++$test;
cristyf74ca2a2013-04-07 00:27:59 +000029testReadWriteCompare( 'input_idat.jng', 'idat_tmp.jng', '../reference/jng/write_idat.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000030++$test;
cristyf74ca2a2013-04-07 00:27:59 +000031testReadWriteCompare( 'input_jdaa.jng', 'jdaa_tmp.jng', '../reference/jng/write_jdaa.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000032++$test;
cristyf74ca2a2013-04-07 00:27:59 +000033testReadWriteCompare( 'input_prog_idat.jng', 'prog_idat_tmp.jng', '../reference/jng/write_prog_idat.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000034++$test;
cristyf74ca2a2013-04-07 00:27:59 +000035testReadWriteCompare( 'input_prog_jdaa.jng', 'prog_jdaa_tmp.jng', '../reference/jng/write_prog_jdaa.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000036++$test;
cristyf74ca2a2013-04-07 00:27:59 +000037testReadWriteCompare( 'input_prog.jng', 'prog_tmp.jng', '../reference/jng/write_prog.miff', q//, q//, 0.06, 0.36);
cristy3ed852e2009-09-05 21:47:34 +000038