diff --git a/test/Makefile.am b/test/Makefile.am index 52a3fa4b..8992ef04 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -34,6 +34,7 @@ TESTS_ENVIRONMENT = \ MEMCHECK="$(MEMCHECK)" EXTRA_DIST = \ + $(REFFILES) \ $(TESTSCRIPTS) \ $(IMAGES_EXTRA_DIST) \ CMakeLists.txt \ @@ -144,6 +145,14 @@ TESTSCRIPTS = \ tiff2rgba-rgb-3c-8b.sh \ $(JPEG_DEPENDENT_TESTSCRIPTS) +# This list should contain the references files +# from the 'refs' subdirectory +REFFILES = \ + refs/o-tiff2ps-EPS1.ps \ + refs/o-tiff2ps-PS1.ps \ + refs/o-tiff2ps-PS2.ps \ + refs/o-tiff2ps-PS3.ps + # This list should contain all of the TIFF files in the 'images' # subdirectory which are intended to be used as input images for # tests. All of these files should use the extension ".tiff". diff --git a/test/common.sh b/test/common.sh index 42c38737..5bebcd37 100644 --- a/test/common.sh +++ b/test/common.sh @@ -7,6 +7,7 @@ SRCDIR=`cd $SRCDIR && pwd` TOPSRCDIR=`cd $srcdir/.. && pwd` TOOLS=`cd ../tools && pwd` IMAGES="${SRCDIR}/images" +REFS="${SRCDIR}/refs" # Aliases for built tools FAX2PS=${TOOLS}/fax2ps diff --git a/test/refs/o-tiff2ps-EPS1.ps b/test/refs/o-tiff2ps-EPS1.ps new file mode 100644 index 00000000..9d9da8a2 --- /dev/null +++ b/test/refs/o-tiff2ps-EPS1.ps @@ -0,0 +1,112 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 1 +%%Pages: 1 1 +%%EndComments +%%Page: 1 1 +gsave +100 dict begin +157.000000 151.000000 scale +%ImageData: 157 151 1 1 0 1 2 "image" +/scanLine 20 string def +157 151 1 +[157 0 0 -151 0 151] +{currentfile scanLine readhexstring pop} bind +image +0204153c0bfffffffff1ffffc7e01017ff8057ff5aa2803e1ffffffe0697ffffc7e485 +dfffd77fff48aca4dfd7fffff80003ffffcffe017fffe0c7ff1101250ffbfffff0241b +ffffffff80fffff37fff29fa48abf7ffffe41221ffffafffe3fffff19fff7ff82200f7 +fdff0040803fff5ffff5ffffe17ffffffe00088bc0070008259fff7ffffdfffff0ffff +7ffe040003c0001222001fff3ffffffffff15fdfffff084003004104809493fc1dffff +ffffc1badfffff0fd000010020140009e337ffffffffc3efffffff1abc040400000502 +04c6bfffffefffc36b7ffffe1ffe0c808804009490061bffffffff82fafffffc3dff08 +080000020042a78fffffffff87f7fffffc1fff0c0010428049080c27ffffffff87feff +fffc7ffd108000e0611090103ffffffffe077dfffffdbffc340003e808020203cfffff +fffc0bd77fffe0fffc000003e10022008877fffffffc06fdff3fe35ffc780217c02808 +28000ffffffff80f5fff6bc27ff040000fc00100a20103ffffffc007f5ff5ec2ffe082 +200bc480420454a1ffffffe0065fff7fc5ff0010005f1000205a4929ffffffe003d7ff +5fe7b80008202f029804000000ffffffc003efff37e5fe0010001e0401020240917fff +ffc004effffffbf80022001f018888a429087fffff8007b7ff5ff3e00080009c002122 +2544015ffff9c01fb7ff7ef7c0100400fc8408000020981ffff0783fe97f77fbc00800 +017e009006560a4547ffd2bffbffff5fd780020000f801041000a00033fccdbb9ffeff +1ba000500003fa1024a249125025f033effffeffffc000c00042f002860800880540d0 +47ffffffff574001c80003f9803e405054411400a9bfffffff7e0003804003f00a0302 +090114800005efffffff6f0003880007fc0203a040a3522a4017ffffffff5f00034000 +1af980a884120f1f8c000adffffffffff80fc0000ff82810420a27ffa800067fffffff +fff80f400033fc010a44508fff8e000bfffffffffffc0fc0003ff9809842404fff9e20 +07ffffdff7fffe0d400003ff200220291fff9b401afffffffffffc1fe01359ff089620 +015fffaa001bffffff1ffffa3d703eeeff810b22480fff905006fffffd6ffff81fb078 +adffe40e00412fff85400d7ffff9fffff01d787fedffe08ba8185fff501007ffff925f +fff03af8e7f7fff13f81401ffe054005ffffc1fffff03ffcf5effff00fa0094754d310 +05fffb07bfff803ffdddfffff00fe0145ea503d00fffff2f5fff003abfdffffff23fd2 +000151a7d81afffe3f7f7f803bbffffffff88fe081a02a23d006fffe7fbf39403ffebf +fffff23fe408068007d00bfffeffff6bf83f7f7ffffffd1fe01004aa2ff005fffff55f +46581afde7fffff087f00151008fd0027fffe2ff75f83fdc7bfffff05ff04004600fc0 +097fffc7ff79503677fffffff90ffa0495069f9002b7ffc9bf1e403edb7bfffff94ff0 +0420005f000127f7c3ff1e201764dffffff811440106963f80001ddffc5f0000296bbf +fffff842920b0200fe0000007fffbf00003681ebfffff8096cffc094fc20001fffff5f +000001015ffffff88064dfc001f980003ffffff700000200f9fffff0130a0fc29af400 +007fffffff00000003affffff8041403c2297d1800ffffffcf00000003fdfffff000a9 +87e402d01800fffffff720300002bfbffff8299407f005a09800fffffff764000003da +fffff80001aff020040000ffffffef78c00001fbfffff0002107f020880000ffffffc7 +db000003dffffff0024c87f042100000ffffffd759000003f6fffff0100895f801400d +00ffffffc7f3000007fffffff0024137f81e781fe0dfffff8f6c000007effffff00001 +fbfc29fc37b0ffffff8748000003feffffe000017efc11de5fe06fffff07d0000007df +fffff000037bfc13ff9ff07fffff8700000007fffffff0000ffcfe227ffff837ffff1f +2000000fbbfffff0003dfffe41fffffc1fffffe75000000fffffffe00205fdff647fff +f816ffffc7a0000007dfffffe06f843dff635fffff03fdff074000000fffffffe1b3e0 +1affe9ff67ff0522ce074000000fffffffc0bfb003ffc9f27ffe0398290700000007f7 +ffff81fff00fffce4077ff04a020470000000fffffff86fff8057ffcc05fff0000000f +0000000fffffff837ffa0ffff780ffff0000000700000017bfffff0fffff0ffff601ff +ff000000470000000fffffff09dfc78bffffc22fff0000000700000007ffffff0d5bf0 +eeffff89ffff0000000f0000000fffffff0bfff87eff8f12bfff000000270000000fff +ffff0feffc27fffd055fff000004070000001f7fffff3fb6d7ffff7907fffe0000000f +0000001ffffffc3e5d476fc0dd7fffff0000200f0000000ffffffc1ffdbdf5f12bffff +ff0000015f0000001ffffffc1f97edfff05fffefff0000003f0000000ffffff839febb +5ffcabbffffe000008bf0000002ffffffc3d56bfb7ff5fffffff000084ff0000001fff +fff85bdde5fffe29ffffff000000ff0000003fffffe066baaffffebbffffff000012ff +0000001ffffff02aebf66ffe5dffffff000001ff0000001fffffd057757bffff257fff +ff00000bff0000002fffffe0ad575f5fffd5ffffff000240ff0000003fffffc05bbcfe +bfff0a7fffff000003f70000006fffffc02aeb95ffffa5ffffff000093f70000003bff +ffc0aff99df77f0a7bfffe000423f70000003fffffb0112e733ffe95ddfefe000047c7 +0000007fffffe01bf7eeedff0ab3defe00000b970000005fffff804415a9b775a54fff +ee000027c70000007fffff8036db4a3fb685ba7ffe00008787000050bffffff0080455 +e6dd5867df6c000015870000007fffff801051a06eba9abfdffe000003070000605fff +ffc006082bb7ed954976f800000c07000000ffffffc004022a757a252bf7fc00002507 +0000a07effff700568591fe55ada2e9c00000007000000bffffe400a3a24a55a656fff +bc00000587000000fffffbe000845a5df81ad59af8000020070000009fffffe0004c24 +93c85556edf400000007000000ffffbf8000b25b2dbd1aa57bbc00000007000001ffff +ffa000491466e0035c5ffc00001407000001bfffffc000248b0bb86497db7000000007 +000000ffffff4000122a35390a26effc000000070000007fffff8000498782e454d579 +7c00000007000001bfffffc000210953ba89495ff400000007000001fbffffc0002892 +a968256ebde800000007000001ffffffc000858581f914dbfb7c00000007000003bfff +ff00002142649887699dfc00000007000001bfffff00004a80a961296dffe802000007 +000002dfffff00001191489822b757f800000007400001bfffff00001004a9a85576fb +d8000000077e2007ffffff0000038141500a97afb8000000077658077bffff00000611 +aca951ee79d000000007ffa207effffe0000008a51500c556ff000000007ffc907ffff +fe0000028141c80467e77000000007ff74065ffffe00000126ac50005cbfe000000007 +ffe80dfffffc0000008155a00017efc000000007fffe075ffffc000002a4aa58012937 +4000000007fffc0efffffc00000003ad50002acd8500000007fffd19dffffc000000a0 +62a000077f8058000007fffa0dfffffc00000084d9a800157501f0000007fffe06bfff +fc000000216450006dce023f000007fffc06bffff0000000601a400015d801ff500007 +fff009e7fff000000000418000057001ffb28007ffe0037fffe0000000c0a000000240 +07fffe8007fff0011bffe000000010010000007b21ffffe007ffffffffffe000000000 +000000007f82fffffc07ffffffffffc000000000000000007fc1ffffff07ffffffffff +c900000000000000006c04fffffb07ffffffffffffa0000000000000000c027ffff847 +ffffffffffffffc00000000000000001affffa27fffffffffffffff000000000000000 +04005ffc07fffffffffffffffd0000000000000000000000075fffffffffffffffc000 +000000000000220180ef1ffffffffffffffffe00000000000002000883ff1fffffffff +ffffffff00001800000000000009ff3fffffffffffffffff0000000001418000003bff +2fffffffffffffffff00010000027000901207ff7fffffffffffffffff7e00010037f8 +0018000fff7fffffffffffffffffff00a44007fc0030423fff7fffffffffffffffffff +c043002ffc003000afff +end +grestore +showpage +%%Trailer +%%EOF diff --git a/test/refs/o-tiff2ps-PS1.ps b/test/refs/o-tiff2ps-PS1.ps new file mode 100644 index 00000000..62c3e4bb --- /dev/null +++ b/test/refs/o-tiff2ps-PS1.ps @@ -0,0 +1,115 @@ +%!PS-Adobe-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 1 +%%Pages: (atend) +%%EndComments +%%BeginSetup +%%EndSetup +%%Page: 1 1 +gsave +100 dict begin +157.000000 151.000000 scale +%ImageData: 157 151 1 1 0 1 2 "image" +/scanLine 20 string def +157 151 1 +[157 0 0 -151 0 151] +{currentfile scanLine readhexstring pop} bind +image +0204153c0bfffffffff1ffffc7e01017ff8057ff5aa2803e1ffffffe0697ffffc7e485 +dfffd77fff48aca4dfd7fffff80003ffffcffe017fffe0c7ff1101250ffbfffff0241b +ffffffff80fffff37fff29fa48abf7ffffe41221ffffafffe3fffff19fff7ff82200f7 +fdff0040803fff5ffff5ffffe17ffffffe00088bc0070008259fff7ffffdfffff0ffff +7ffe040003c0001222001fff3ffffffffff15fdfffff084003004104809493fc1dffff +ffffc1badfffff0fd000010020140009e337ffffffffc3efffffff1abc040400000502 +04c6bfffffefffc36b7ffffe1ffe0c808804009490061bffffffff82fafffffc3dff08 +080000020042a78fffffffff87f7fffffc1fff0c0010428049080c27ffffffff87feff +fffc7ffd108000e0611090103ffffffffe077dfffffdbffc340003e808020203cfffff +fffc0bd77fffe0fffc000003e10022008877fffffffc06fdff3fe35ffc780217c02808 +28000ffffffff80f5fff6bc27ff040000fc00100a20103ffffffc007f5ff5ec2ffe082 +200bc480420454a1ffffffe0065fff7fc5ff0010005f1000205a4929ffffffe003d7ff +5fe7b80008202f029804000000ffffffc003efff37e5fe0010001e0401020240917fff +ffc004effffffbf80022001f018888a429087fffff8007b7ff5ff3e00080009c002122 +2544015ffff9c01fb7ff7ef7c0100400fc8408000020981ffff0783fe97f77fbc00800 +017e009006560a4547ffd2bffbffff5fd780020000f801041000a00033fccdbb9ffeff +1ba000500003fa1024a249125025f033effffeffffc000c00042f002860800880540d0 +47ffffffff574001c80003f9803e405054411400a9bfffffff7e0003804003f00a0302 +090114800005efffffff6f0003880007fc0203a040a3522a4017ffffffff5f00034000 +1af980a884120f1f8c000adffffffffff80fc0000ff82810420a27ffa800067fffffff +fff80f400033fc010a44508fff8e000bfffffffffffc0fc0003ff9809842404fff9e20 +07ffffdff7fffe0d400003ff200220291fff9b401afffffffffffc1fe01359ff089620 +015fffaa001bffffff1ffffa3d703eeeff810b22480fff905006fffffd6ffff81fb078 +adffe40e00412fff85400d7ffff9fffff01d787fedffe08ba8185fff501007ffff925f +fff03af8e7f7fff13f81401ffe054005ffffc1fffff03ffcf5effff00fa0094754d310 +05fffb07bfff803ffdddfffff00fe0145ea503d00fffff2f5fff003abfdffffff23fd2 +000151a7d81afffe3f7f7f803bbffffffff88fe081a02a23d006fffe7fbf39403ffebf +fffff23fe408068007d00bfffeffff6bf83f7f7ffffffd1fe01004aa2ff005fffff55f +46581afde7fffff087f00151008fd0027fffe2ff75f83fdc7bfffff05ff04004600fc0 +097fffc7ff79503677fffffff90ffa0495069f9002b7ffc9bf1e403edb7bfffff94ff0 +0420005f000127f7c3ff1e201764dffffff811440106963f80001ddffc5f0000296bbf +fffff842920b0200fe0000007fffbf00003681ebfffff8096cffc094fc20001fffff5f +000001015ffffff88064dfc001f980003ffffff700000200f9fffff0130a0fc29af400 +007fffffff00000003affffff8041403c2297d1800ffffffcf00000003fdfffff000a9 +87e402d01800fffffff720300002bfbffff8299407f005a09800fffffff764000003da +fffff80001aff020040000ffffffef78c00001fbfffff0002107f020880000ffffffc7 +db000003dffffff0024c87f042100000ffffffd759000003f6fffff0100895f801400d +00ffffffc7f3000007fffffff0024137f81e781fe0dfffff8f6c000007effffff00001 +fbfc29fc37b0ffffff8748000003feffffe000017efc11de5fe06fffff07d0000007df +fffff000037bfc13ff9ff07fffff8700000007fffffff0000ffcfe227ffff837ffff1f +2000000fbbfffff0003dfffe41fffffc1fffffe75000000fffffffe00205fdff647fff +f816ffffc7a0000007dfffffe06f843dff635fffff03fdff074000000fffffffe1b3e0 +1affe9ff67ff0522ce074000000fffffffc0bfb003ffc9f27ffe0398290700000007f7 +ffff81fff00fffce4077ff04a020470000000fffffff86fff8057ffcc05fff0000000f +0000000fffffff837ffa0ffff780ffff0000000700000017bfffff0fffff0ffff601ff +ff000000470000000fffffff09dfc78bffffc22fff0000000700000007ffffff0d5bf0 +eeffff89ffff0000000f0000000fffffff0bfff87eff8f12bfff000000270000000fff +ffff0feffc27fffd055fff000004070000001f7fffff3fb6d7ffff7907fffe0000000f +0000001ffffffc3e5d476fc0dd7fffff0000200f0000000ffffffc1ffdbdf5f12bffff +ff0000015f0000001ffffffc1f97edfff05fffefff0000003f0000000ffffff839febb +5ffcabbffffe000008bf0000002ffffffc3d56bfb7ff5fffffff000084ff0000001fff +fff85bdde5fffe29ffffff000000ff0000003fffffe066baaffffebbffffff000012ff +0000001ffffff02aebf66ffe5dffffff000001ff0000001fffffd057757bffff257fff +ff00000bff0000002fffffe0ad575f5fffd5ffffff000240ff0000003fffffc05bbcfe +bfff0a7fffff000003f70000006fffffc02aeb95ffffa5ffffff000093f70000003bff +ffc0aff99df77f0a7bfffe000423f70000003fffffb0112e733ffe95ddfefe000047c7 +0000007fffffe01bf7eeedff0ab3defe00000b970000005fffff804415a9b775a54fff +ee000027c70000007fffff8036db4a3fb685ba7ffe00008787000050bffffff0080455 +e6dd5867df6c000015870000007fffff801051a06eba9abfdffe000003070000605fff +ffc006082bb7ed954976f800000c07000000ffffffc004022a757a252bf7fc00002507 +0000a07effff700568591fe55ada2e9c00000007000000bffffe400a3a24a55a656fff +bc00000587000000fffffbe000845a5df81ad59af8000020070000009fffffe0004c24 +93c85556edf400000007000000ffffbf8000b25b2dbd1aa57bbc00000007000001ffff +ffa000491466e0035c5ffc00001407000001bfffffc000248b0bb86497db7000000007 +000000ffffff4000122a35390a26effc000000070000007fffff8000498782e454d579 +7c00000007000001bfffffc000210953ba89495ff400000007000001fbffffc0002892 +a968256ebde800000007000001ffffffc000858581f914dbfb7c00000007000003bfff +ff00002142649887699dfc00000007000001bfffff00004a80a961296dffe802000007 +000002dfffff00001191489822b757f800000007400001bfffff00001004a9a85576fb +d8000000077e2007ffffff0000038141500a97afb8000000077658077bffff00000611 +aca951ee79d000000007ffa207effffe0000008a51500c556ff000000007ffc907ffff +fe0000028141c80467e77000000007ff74065ffffe00000126ac50005cbfe000000007 +ffe80dfffffc0000008155a00017efc000000007fffe075ffffc000002a4aa58012937 +4000000007fffc0efffffc00000003ad50002acd8500000007fffd19dffffc000000a0 +62a000077f8058000007fffa0dfffffc00000084d9a800157501f0000007fffe06bfff +fc000000216450006dce023f000007fffc06bffff0000000601a400015d801ff500007 +fff009e7fff000000000418000057001ffb28007ffe0037fffe0000000c0a000000240 +07fffe8007fff0011bffe000000010010000007b21ffffe007ffffffffffe000000000 +000000007f82fffffc07ffffffffffc000000000000000007fc1ffffff07ffffffffff +c900000000000000006c04fffffb07ffffffffffffa0000000000000000c027ffff847 +ffffffffffffffc00000000000000001affffa27fffffffffffffff000000000000000 +04005ffc07fffffffffffffffd0000000000000000000000075fffffffffffffffc000 +000000000000220180ef1ffffffffffffffffe00000000000002000883ff1fffffffff +ffffffff00001800000000000009ff3fffffffffffffffff0000000001418000003bff +2fffffffffffffffff00010000027000901207ff7fffffffffffffffff7e00010037f8 +0018000fff7fffffffffffffffffff00a44007fc0030423fff7fffffffffffffffffff +c043002ffc003000afff +end +grestore +showpage +%%Trailer +%%Pages: 1 +%%EOF diff --git a/test/refs/o-tiff2ps-PS2.ps b/test/refs/o-tiff2ps-PS2.ps new file mode 100644 index 00000000..e7fe4339 --- /dev/null +++ b/test/refs/o-tiff2ps-PS2.ps @@ -0,0 +1,104 @@ +%!PS-Adobe-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 2 +%%Pages: (atend) +%%EndComments +%%BeginSetup +gsave newpath clippath pathbbox grestore + 4 2 roll 2 copy translate + exch 3 1 roll sub 3 1 roll sub exch + currentpagedevice /PageSize get aload pop + exch 3 1 roll div 3 1 roll div abs exch abs + 2 copy gt { exch } if pop + dup 1 lt { dup scale } { pop } ifelse +%%EndSetup +%%Page: 1 1 +%%PageOrientation: Landscape +%%PageBoundingBox: 0 0 157 151 +1 dict begin /PageSize [ 157.000000 151.000000 ] def currentdict end setpagedevice +<< + /Policies << + /PageSize 3 + >> +>> setpagedevice +gsave +100 dict begin +157.000000 151.000000 scale +% PostScript Level 2 only. +/DeviceGray setcolorspace +{ % exec + /im_stream currentfile /ASCII85Decode filter def + << + /ImageType 1 + /Width 157 + /Height 151 + /ImageMatrix [ 157 0 0 -151 0 151 ] + /BitsPerComponent 1 + /Interpolate true + /Decode [1 0] + /DataSource im_stream + >> image + im_stream status { im_stream flushfile } if +} +exec +rVPltoDejk!"Ju/3$7VQ!.UpIV-SSehuE`Xq.Ka.3#d/d!%7!!%KK!"=AXeciN^#QOiDmG7gC:]MI8!"NB:J-Xp1#Qb#+^OO$!TE#cC5^]4?7!"PYE!!)c.r;XM.Iqrj&iW&rY!'Wgo +!!)LAs8N&Uli6Yua8c2?!'Cem!!)+JqtpEnqYg:O5QCcq!'HKr!!2!Yo7(u]s(cQKj8]/[!.>"N +!!C(
cF4GB[9BpOE5DJ+uP7
+TF;qBJ,a$YhVHntrh'5q5N#'4JI"L/qu6bFp](9NBA`b#LVO[UL]fs:s8ITLDu$C*]!q_l5Qh&e
+TI> cF4GB[9BpOE5DJ+uP7
+TF;qBJ,a$YhVHntrh'5q5N#'4JI"L/qu6bFp](9NBA`b#LVO[UL]fs:s8ITLDu$C*]!q_l5Qh&e
+TI>