• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/perl
2#
3# Test writing PNG images when 16bit support is enabled
4#
5# Contributed by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
6#
7BEGIN { $| = 1; $test=1; print "1..5\n"; }
8END {print "not ok $test\n" unless $loaded;}
9
10use Image::Magick;
11$loaded=1;
12
13require 't/subroutines.pl';
14
15chdir 't/png' || die 'Cd failed';
16
17#
18# 1) Test pseudocolor image
19#
20testReadWrite( 'input_256.png',
21  'output_256.png',
22  q/quality=>54/,
23  '5798b9623e5922d3f6c0e87ae76ccc5a69568258e557613f20934f2de6ee2d35' );
24
25#
26# 2) Test truecolor image
27#
28++$test;
29testReadWrite( 'input_truecolor.png',
30  'output_truecolor.png',
31  q/quality=>55/,
32  'eb9adaa26f3cda80273f436ddb92805da2cb88dd032d24380cd48cf05432a326' );
33
34#
35# 3) Test monochrome image
36#
37++$test;
38testReadWrite( 'input_mono.png',
39  'output_mono.png', '',
40  'fa43f8c3d45c3efadab6791a6de83b5a303f65e2c1d58e0814803a4846e68593' );
41
42#
43# 4) Test Multiple-image Network Graphics
44#
45++$test;
46testReadWrite( 'input.mng',
47  'output.mng',
48  q/quality=>55/,
49  '65c0eacf6e060b9fb8467eaa0f74e2dcc3ef72d06577f06a506bd0546b01fb61' );
50
51#
52# 5) Test 16-bit Portable Network Graphics
53#
54++$test;
55testReadWrite( 'input_16.png',
56  'output_16.png',
57  q/quality=>55/,
58  '593d0b64579cbeb07a2f4d5fcc3ab77a320204580442a8b6a95ef141030427de',
59  '2d30a8bed1ae8bd19c8320e861f3140dfc7497ca8a05d249734ab41c71272f08');
60
61
62