diff options
Diffstat (limited to 'PerlMagick')
29 files changed, 47 insertions, 48 deletions
diff --git a/PerlMagick/Magick.pm b/PerlMagick/Magick.pm index 158ead4..4052188 100644 --- a/PerlMagick/Magick.pm +++ b/PerlMagick/Magick.pm @@ -40,7 +40,7 @@ require AutoLoader; ); # This version identifier must match the package version. -($VERSION) = '1.3.34' =~ /^([\d.]+)/g; +($VERSION) = '1.3.35' =~ /^([\d.]+)/g; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/PerlMagick/t/composite.t b/PerlMagick/t/composite.t index 3dfa587..8a9cf07 100644 --- a/PerlMagick/t/composite.t +++ b/PerlMagick/t/composite.t @@ -29,7 +29,7 @@ chdir 't' || die 'Cd failed'; # Maxium error is ignored since operation depends on floating-point # sensitive threshold. # -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Add'/, 'reference/composite/Add.miff',0.004,1.0); @@ -42,7 +42,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # shape does not appear in the result. # ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Atop'/, 'reference/composite/Atop.miff',0.0025,0.005); @@ -53,7 +53,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result image shaded by composite image. # ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Bumpmap'/, 'reference/composite/Bumpmap.miff',0.0025,0.005); @@ -64,7 +64,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result is transparent where composite image obscures the image. # ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Clear'/, 'reference/composite/Clear.miff',0.0025,0.005); @@ -75,7 +75,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The resulting image is image replaced with composite image. The # matte information is ignored. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Copy'/, 'reference/composite/Copy.miff',0.0025,0.005); @@ -87,7 +87,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # blue layer in composite image. The other layers are copied # untouched. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'CopyBlue'/, 'reference/composite/CopyBlue.miff',0.0025,0.005); @@ -99,7 +99,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # green layer in composite image. The other layers are copied # untouched. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'CopyGreen'/, 'reference/composite/CopyGreen.miff',0.0025,0.005); @@ -110,7 +110,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The resulting image is the red layer in image replaced with the red # layer in composite image. The other layers are copied untouched. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'CopyRed'/, 'reference/composite/CopyRed.miff',0.0025,0.005); @@ -122,7 +122,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # opacity layer in composite image. The other layers are copied # untouched. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'CopyOpacity'/, 'reference/composite/CopyOpacity.miff',0.0025,0.005); @@ -133,7 +133,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result of abs(composite image - image). This is useful for # comparing two very similar images. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Difference'/, 'reference/composite/Difference.miff',0.0025,0.005); @@ -147,10 +147,10 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # differs from over because the portion of composite image outside # image's shape does not appear in the result. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Dissolve', opacity => '25'/, - 'reference/composite/Dissolve.miff',0.003,0.007); + 'reference/composite/Dissolve.miff',0.003,0.008); # # In @@ -158,7 +158,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result is composite image cut by the shape of image. None of # the image data of image will be in the result. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'In'/, 'reference/composite/In.miff',0.0025,0.005); @@ -169,7 +169,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result of composite image - image, with underflow cropped to # zero. The matte channel is ignored (set to 255, full coverage). ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Minus'/, 'reference/composite/Minus.miff',0.0025,0.005); @@ -180,7 +180,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The result of composite image * image. This is useful for the # creation of drop-shadows. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Multiply'/, 'reference/composite/Multiply.miff',0.0025,0.005); @@ -191,7 +191,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # The resulting image is composite image with the shape of image cut # out. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Out'/, 'reference/composite/Out.miff',0.0025,0.005); @@ -203,7 +203,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # opaque areas of composite image obscuring image in the # region of overlap. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Over'/, 'reference/composite/Over.miff',0.0025,0.005); @@ -215,7 +215,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # cropped to 255 (no overflow). This operation is independent of the # matte channels. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Plus'/, 'reference/composite/Plus.miff',0.0025,0.005); @@ -231,7 +231,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # sensitive threshold. # ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Subtract'/, 'reference/composite/Subtract.miff',0.006,1.0); @@ -243,7 +243,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # that is outside the overlap region. The overlap region will be # blank. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Xor'/, 'reference/composite/Xor.miff',0.002,0.005); @@ -253,7 +253,7 @@ testCompositeCompare('gradient:white-black',q/size=>"100x80"/, # # The result of composite image / image. ++$test; -testCompositeCompare('gradient:white-black',q/size=>"100x80"/, +testCompositeCompare('gradient:black-white',q/size=>"100x80"/, 'input_matte.miff', q//, q/, gravity=>'Center', compose=>'Divide'/, 'reference/composite/Divide.miff',0.0025,0.02); diff --git a/PerlMagick/t/read.t b/PerlMagick/t/read.t index cd4a273..3d09a4b 100644 --- a/PerlMagick/t/read.t +++ b/PerlMagick/t/read.t @@ -1,5 +1,5 @@ #!/usr/local/bin/perl -# Copyright (C) 2003 - 2016 GraphicsMagick Group +# Copyright (C) 2003-2019 GraphicsMagick Group # Copyright (C) 2002 ImageMagick Studio # Copyright (C) 1991-1999 E. I. du Pont de Nemours and Company # @@ -96,7 +96,7 @@ testReadCompare('input.gif87', 'reference/read/input_gif87.miff', q//, 0, 0); print("Gradient (gradual passing from one shade to another) ...\n"); ++$test; testReadCompare('gradient:red-blue', 'reference/read/gradient.miff', - q/size=>"70x46"/, 0.003, 0.004); + q/size=>"256x256"/, 0.003, 0.004); print("GRANITE (granite texture) ...\n"); ++$test; @@ -352,4 +352,3 @@ print("UYVY format ...\n"); ++$test; testReadCompare('input_70x46.uyvy', 'reference/read/input_uyvy.miff', q/size=>"70x46", depth=>8/, 0.006, 0.008); - diff --git a/PerlMagick/t/reference/composite/Add.miff b/PerlMagick/t/reference/composite/Add.miff Binary files differindex 441896f..c0d5e2a 100644 --- a/PerlMagick/t/reference/composite/Add.miff +++ b/PerlMagick/t/reference/composite/Add.miff diff --git a/PerlMagick/t/reference/composite/Atop.miff b/PerlMagick/t/reference/composite/Atop.miff Binary files differindex 17c8881..6e7bc38 100644 --- a/PerlMagick/t/reference/composite/Atop.miff +++ b/PerlMagick/t/reference/composite/Atop.miff diff --git a/PerlMagick/t/reference/composite/Bumpmap.miff b/PerlMagick/t/reference/composite/Bumpmap.miff Binary files differindex 79157b0..3995cf5 100644 --- a/PerlMagick/t/reference/composite/Bumpmap.miff +++ b/PerlMagick/t/reference/composite/Bumpmap.miff diff --git a/PerlMagick/t/reference/composite/Clear.miff b/PerlMagick/t/reference/composite/Clear.miff Binary files differindex a83a709..1052d0a 100644 --- a/PerlMagick/t/reference/composite/Clear.miff +++ b/PerlMagick/t/reference/composite/Clear.miff diff --git a/PerlMagick/t/reference/composite/Copy.miff b/PerlMagick/t/reference/composite/Copy.miff Binary files differindex 433e0c9..0801df1 100644 --- a/PerlMagick/t/reference/composite/Copy.miff +++ b/PerlMagick/t/reference/composite/Copy.miff diff --git a/PerlMagick/t/reference/composite/CopyBlue.miff b/PerlMagick/t/reference/composite/CopyBlue.miff Binary files differindex de33204..0a541d9 100644 --- a/PerlMagick/t/reference/composite/CopyBlue.miff +++ b/PerlMagick/t/reference/composite/CopyBlue.miff diff --git a/PerlMagick/t/reference/composite/CopyGreen.miff b/PerlMagick/t/reference/composite/CopyGreen.miff Binary files differindex bc3219a..4b2674d 100644 --- a/PerlMagick/t/reference/composite/CopyGreen.miff +++ b/PerlMagick/t/reference/composite/CopyGreen.miff diff --git a/PerlMagick/t/reference/composite/CopyOpacity.miff b/PerlMagick/t/reference/composite/CopyOpacity.miff Binary files differindex 71edfc7..936c682 100644 --- a/PerlMagick/t/reference/composite/CopyOpacity.miff +++ b/PerlMagick/t/reference/composite/CopyOpacity.miff diff --git a/PerlMagick/t/reference/composite/CopyRed.miff b/PerlMagick/t/reference/composite/CopyRed.miff Binary files differindex 68420b1..f3a818d 100644 --- a/PerlMagick/t/reference/composite/CopyRed.miff +++ b/PerlMagick/t/reference/composite/CopyRed.miff diff --git a/PerlMagick/t/reference/composite/Difference.miff b/PerlMagick/t/reference/composite/Difference.miff Binary files differindex 3f55440..197fa34 100644 --- a/PerlMagick/t/reference/composite/Difference.miff +++ b/PerlMagick/t/reference/composite/Difference.miff diff --git a/PerlMagick/t/reference/composite/Dissolve.miff b/PerlMagick/t/reference/composite/Dissolve.miff Binary files differindex 40e8ce1..1ef301c 100644 --- a/PerlMagick/t/reference/composite/Dissolve.miff +++ b/PerlMagick/t/reference/composite/Dissolve.miff diff --git a/PerlMagick/t/reference/composite/Divide.miff b/PerlMagick/t/reference/composite/Divide.miff Binary files differindex dc40ea9..846c269 100644 --- a/PerlMagick/t/reference/composite/Divide.miff +++ b/PerlMagick/t/reference/composite/Divide.miff diff --git a/PerlMagick/t/reference/composite/In.miff b/PerlMagick/t/reference/composite/In.miff Binary files differindex 433e0c9..0801df1 100644 --- a/PerlMagick/t/reference/composite/In.miff +++ b/PerlMagick/t/reference/composite/In.miff diff --git a/PerlMagick/t/reference/composite/Minus.miff b/PerlMagick/t/reference/composite/Minus.miff Binary files differindex f414e14..8545272 100644 --- a/PerlMagick/t/reference/composite/Minus.miff +++ b/PerlMagick/t/reference/composite/Minus.miff diff --git a/PerlMagick/t/reference/composite/Multiply.miff b/PerlMagick/t/reference/composite/Multiply.miff Binary files differindex 23fc01e..39fe672 100644 --- a/PerlMagick/t/reference/composite/Multiply.miff +++ b/PerlMagick/t/reference/composite/Multiply.miff diff --git a/PerlMagick/t/reference/composite/Out.miff b/PerlMagick/t/reference/composite/Out.miff Binary files differindex 591ab02..90dd933 100644 --- a/PerlMagick/t/reference/composite/Out.miff +++ b/PerlMagick/t/reference/composite/Out.miff diff --git a/PerlMagick/t/reference/composite/Over.miff b/PerlMagick/t/reference/composite/Over.miff Binary files differindex 17c8881..6e7bc38 100644 --- a/PerlMagick/t/reference/composite/Over.miff +++ b/PerlMagick/t/reference/composite/Over.miff diff --git a/PerlMagick/t/reference/composite/Plus.miff b/PerlMagick/t/reference/composite/Plus.miff Binary files differindex 0e75c04..2696eaa 100644 --- a/PerlMagick/t/reference/composite/Plus.miff +++ b/PerlMagick/t/reference/composite/Plus.miff diff --git a/PerlMagick/t/reference/composite/Subtract.miff b/PerlMagick/t/reference/composite/Subtract.miff Binary files differindex 31f25e4..b9d61ba 100644 --- a/PerlMagick/t/reference/composite/Subtract.miff +++ b/PerlMagick/t/reference/composite/Subtract.miff diff --git a/PerlMagick/t/reference/composite/Xor.miff b/PerlMagick/t/reference/composite/Xor.miff Binary files differindex a83a709..1052d0a 100644 --- a/PerlMagick/t/reference/composite/Xor.miff +++ b/PerlMagick/t/reference/composite/Xor.miff diff --git a/PerlMagick/t/reference/read/gradient.miff b/PerlMagick/t/reference/read/gradient.miff Binary files differindex dc1a215..3f30e79 100644 --- a/PerlMagick/t/reference/read/gradient.miff +++ b/PerlMagick/t/reference/read/gradient.miff diff --git a/PerlMagick/t/reference/wmf/clock.miff b/PerlMagick/t/reference/wmf/clock.miff Binary files differindex b5ca6d5..be6f4c2 100644 --- a/PerlMagick/t/reference/wmf/clock.miff +++ b/PerlMagick/t/reference/wmf/clock.miff diff --git a/PerlMagick/t/reference/wmf/fulltest.miff b/PerlMagick/t/reference/wmf/fulltest.miff Binary files differnew file mode 100644 index 0000000..b50305d --- /dev/null +++ b/PerlMagick/t/reference/wmf/fulltest.miff diff --git a/PerlMagick/t/reference/wmf/ski.miff b/PerlMagick/t/reference/wmf/ski.miff Binary files differindex be164a3..1a2d466 100644 --- a/PerlMagick/t/reference/wmf/ski.miff +++ b/PerlMagick/t/reference/wmf/ski.miff diff --git a/PerlMagick/t/subroutines.pl b/PerlMagick/t/subroutines.pl index af54073..c2b8166 100644 --- a/PerlMagick/t/subroutines.pl +++ b/PerlMagick/t/subroutines.pl @@ -249,12 +249,12 @@ sub testRead { undef $status; $magick=$image->Get('magick'); $signature=$image->Get('signature'); - + if ( $signature ne $ref_signature ) { print "ReadImage()\n"; - print "Image: $infile, signatures do not match.\n"; - print " Computed: $signature\n"; - print " Expected: $ref_signature\n"; + print "Image: $infile, signatures do not match.\n"; + print " Computed: $signature\n"; + print " Expected: $ref_signature\n"; print " Depth: $depth\n"; ++$failure; defined $ENV{'PERL_DEBUG'} && $image->Display(); @@ -310,7 +310,7 @@ sub testRead { print "not ok $test\n"; } else { print "ok $test\n"; - } + } } @@ -326,7 +326,7 @@ sub testReadCompare { # Create images $srcimage=Graphics::Magick->new; - $refimage=Graphics::Magick->new; + $refimage=Graphics::Magick->new; if ( "$read_options" ne "" ) { eval "\$status=\$srcimage->Set($read_options);"; @@ -337,7 +337,7 @@ sub testReadCompare { goto COMPARE_RUNTIME_ERROR; } } - + $status=$srcimage->ReadImage("$srcimage_name"); if ("$status") { @@ -440,7 +440,7 @@ sub testReadCompare { # sub testReadSized { my( $infile, $size, $depth, $ref_8, $ref_16, $ref_32 ) = @_; - + my($image,$ref_signature); if ( !defined( $ref_16 ) ) @@ -486,9 +486,9 @@ sub testReadSized { $signature=$image->Get('signature'); if ( $signature ne $ref_signature ) { print "ReadImage()\n"; - print "Image: $infile, signatures do not match.\n"; - print " Computed: $signature\n"; - print " Expected: $ref_signature\n"; + print "Image: $infile, signatures do not match.\n"; + print " Computed: $signature\n"; + print " Expected: $ref_signature\n"; print " Depth: $depth\n"; print "not ok $test\n"; defined $ENV{'PERL_DEBUG'} && $image->Display(); @@ -515,7 +515,7 @@ sub testReadSized { # sub testReadWrite { my( $infile, $outfile, $writeoptions, $ref_8, $ref_16, $ref_32 ) = @_; - + my($image); if ( !defined( $ref_16 ) ) @@ -603,7 +603,7 @@ sub testReadWriteCompare { $errorinfo=''; $image=Graphics::Magick->new; - $refimage=Graphics::Magick->new; + $refimage=Graphics::Magick->new; # # Read the initial image @@ -749,9 +749,9 @@ sub testReadWriteCompare { # sub testReadWriteNoVerify { my( $infile, $outfile, $writeoptions) = @_; - + my($image, $images); - + $image=Graphics::Magick->new; $status=$image->ReadImage("$infile"); if( "$status" ) { @@ -810,7 +810,7 @@ sub testReadWriteNoVerify { sub testReadWriteSized { my( $infile, $outfile, $size, $readdepth, $writeoptions, $ref_8, $ref_16, $ref_32 ) = @_; - + my($image,$depth,$ref_signature); if ( !defined( $ref_16 ) ) @@ -917,7 +917,7 @@ sub testSetAttribute { my( $srcimage, $name, $attribute ) = @_; my($image); - + # Create temporary image $image=Graphics::Magick->new; @@ -1031,7 +1031,7 @@ sub testMontage { '#808080', '#808000', '#FFFFFF', '#FFFF00', '#800000', '#000080', '#FF0000', '#0000FF', '#800080', '#008080', '#FF00FF', '#00FFFF' ); - + my $color; foreach $color ( @colors ) { @@ -1068,7 +1068,7 @@ sub testMontage { print "not ok $test\n"; return 1; } - + if( ! ref($montage) ) { print "not ok $test\n"; } else { @@ -1079,12 +1079,12 @@ sub testMontage { if ( $signature ne $ref_signature ) { print "ReadImage()\n"; print "Test $test, signatures do not match.\n"; - print " Computed: $signature\n"; - print " Expected: $ref_signature\n"; + print " Computed: $signature\n"; + print " Expected: $ref_signature\n"; print " Depth: $depth\n"; $status = $montage->Write("test_${test}_out.miff"); warn "Write: $status" if "$status"; - + print "not ok $test\n"; } else { # Check montage directory diff --git a/PerlMagick/t/wmf/read.t b/PerlMagick/t/wmf/read.t index 3f36734..af508f3 100644 --- a/PerlMagick/t/wmf/read.t +++ b/PerlMagick/t/wmf/read.t @@ -29,7 +29,7 @@ testReadCompare('clock.wmf', '../reference/wmf/clock.miff', q//, 0.002, 0.9); ++$test; testReadCompare('ski.wmf', '../reference/wmf/ski.miff', - q//, 0.021, 0.9); + q//, 0.021, 1.0); ++$test; testReadCompare('fjftest.wmf', '../reference/wmf/fjftest.miff', q//, 0.004, 0.5); |