Index: Changes =================================================================== --- Changes (revision 1238) +++ Changes (working copy) @@ -1,5 +1,13 @@ Imager release history. Older releases can be found in Changes.old +Imager 0.59 +=========== + +Bug fixes: + + - fixes a regression introduced by the fixes for RT 11972 + http://rt.cpan.org/Ticket/Display.html?id=27546 + Imager 0.58 - 16 May 2007 =========== Index: render.im =================================================================== --- render.im (revision 1238) +++ render.im (working copy) @@ -185,7 +185,7 @@ if (src_alpha == IM_SAMPLE_MAX) *linep = STORE_COLOR; else if (src_alpha) { - IM_WORK_T remains = - src_alpha; + IM_WORK_T remains = IM_SAMPLE_MAX - src_alpha; IM_WORK_T orig_alpha = linep->channel[alpha_channel]; IM_WORK_T dest_alpha = src_alpha + (remains * orig_alpha) / IM_SAMPLE_MAX; for (ch = 0; ch < alpha_channel; ++ch) { Index: t/t38ft2font.t =================================================================== --- t/t38ft2font.t (revision 1238) +++ t/t38ft2font.t (working copy) @@ -1,6 +1,6 @@ #!perl -w use strict; -use Test::More tests => 182; +use Test::More tests => 183; ++$|; # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' @@ -20,13 +20,13 @@ SKIP: { - i_has_format("ft2") or skip("no freetype2 library found", 181); + i_has_format("ft2") or skip("no freetype2 library found", 182); print "# has ft2\n"; my $fontname=$ENV{'TTFONTTEST'}||'./fontfiles/dodge.ttf'; - -f $fontname or skip("cannot find fontfile $fontname", 181); + -f $fontname or skip("cannot find fontfile $fontname", 182); my $bgcolor=i_color_new(255,0,0,0); @@ -466,6 +466,15 @@ is_color3($colors[0], 0, 0, 0, "check we got black"); is_color3($colors[1], 255, 0, 0, "and red"); } + + { # RT 27546 + my $im = Imager->new(xsize => 100, ysize => 100, channels => 4); + $im->box(filled => 1, color => '#ff0000FF'); + my $font = Imager::Font->new(file=>'fontfiles/ImUgly.ttf', type=>'ft2'); + ok($im->string(x => 0, 'y' => 40, text => 'test', + size => 11, sizew => 11, font => $font, aa => 1), + 'draw on translucent image') + } } sub align_test {