"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/transp.t" between
GD-2.72.tar.gz and GD-2.73.tar.gz

About: GD is a Perl5 interface to Thomas Boutell’s gd graphics library.

transp.t  (GD-2.72):transp.t  (GD-2.73)
skipping to change at line 24 skipping to change at line 24
$im->transparent( -1 ); $im->transparent( -1 );
is($im->transparent, -1, 'image is not transparent'); is($im->transparent, -1, 'image is not transparent');
my $closest = $im->colorClosest( 24, 53, 62 ); my $closest = $im->colorClosest( 24, 53, 62 );
$im->transparent( $im->colorClosest( 24, 53, 62 ) ); $im->transparent( $im->colorClosest( 24, 53, 62 ) );
is( $im->transparent, $closest, "transparency preserves RGB before $closest" ); is( $im->transparent, $closest, "transparency preserves RGB before $closest" );
is( $im->transparent, $im->colorClosest( 24, 53, 62 ), 'transparency preserves R GB after' ); is( $im->transparent, $im->colorClosest( 24, 53, 62 ), 'transparency preserves R GB after' );
$im = GD::Image->newFromJpeg($jpeg); SKIP: {
$im->transparent( -1 ); skip "No JPEG support", 8 unless defined &GD::Image::newFromJpeg;
is($im->transparent, -1, 'image is not transparent');
$im = GD::Image->newFromJpeg($jpeg);
$im->transparent( -1 );
is($im->transparent, -1, 'image is not transparent');
$closest = $im->colorClosest( 24, 53, 62 ); $closest = $im->colorClosest( 24, 53, 62 );
$im->transparent( $closest ); $im->transparent( $closest );
is( $im->transparent, $closest, 'transparency preserves RGB before' ); is( $im->transparent, $closest, 'transparency preserves RGB before' );
my ($t, $c) = ($im->transparent, $im->colorClosest( 24, 53, 62 )); my ($t, $c) = ($im->transparent, $im->colorClosest( 24, 53, 62 ));
if ($t == $c) { if ($t == $c) {
TODO: { TODO: {
local $TODO = 'colorClosest ignores alpha'; local $TODO = 'colorClosest ignores alpha';
isnt( $t, $c, "Closest" ); isnt( $t, $c, "Closest" );
}
} else {
isnt( $t, $c, "Closest" );
} }
} else { is( $im->transparent, $im->colorClosestAlpha( 24, 53, 62, 255 ), "ClosestAlpha
isnt( $t, $c, "Closest" ); " );
}
is( $im->transparent, $im->colorClosestAlpha( 24, 53, 62, 255 ), "ClosestAlpha"
);
$im = GD::Image->newFromJpeg($frog); $im = GD::Image->newFromJpeg($frog);
$im->transparent( -1 ); $im->transparent( -1 );
is($im->transparent, -1, 'image is not transparent'); is($im->transparent, -1, 'image is not transparent');
$closest = $im->colorClosest( 24, 53, 62 ); $closest = $im->colorClosest( 24, 53, 62 );
$im->transparent( $closest ); $im->transparent( $closest );
is( $im->transparent, $closest, 'transparency preserves RGB before' ); is( $im->transparent, $closest, 'transparency preserves RGB before' );
($t, $c) = ($im->transparent, $im->colorClosest( 24, 53, 62 )); ($t, $c) = ($im->transparent, $im->colorClosest( 24, 53, 62 ));
if ($t == $c) { if ($t == $c) {
TODO: { TODO: {
local $TODO = 'colorClosest ignores alpha'; local $TODO = 'colorClosest ignores alpha';
isnt( $t, $c, "Closest" ); isnt( $t, $c, "Closest" );
}
} else {
isnt( $t, $c, "Closest" );
} }
} else { is( $im->transparent, $im->colorClosestAlpha( 24, 53, 62, 255 ), "ClosestAlpha
isnt( $t, $c, "Closest" ); " );
} }
is( $im->transparent, $im->colorClosestAlpha( 24, 53, 62, 255 ), "ClosestAlpha" );
 End of changes. 10 change blocks. 
27 lines changed or deleted 33 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)