From 272c40d4d766d464057f9d9ad226dc3e408b1af6 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 15 Aug 2013 19:58:46 +0200 Subject: bugfix --- mkindex.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkindex.pl b/mkindex.pl index d9dbbe0..6bee4d2 100755 --- a/mkindex.pl +++ b/mkindex.pl @@ -132,7 +132,7 @@ Show the manpage. Create an index with all TIFF files in the current directory; don't save the index, but pipe it to display(1). -=item mkindex.pl -b '25:RGBA(255,0,0,.5)' -f ':RGBA(0,0,255,.33)' --s_srs=epsg:3067 *.tif index.tif +=item mkindex.pl -b '25:RGBA(255,0,0,.5)' -f ':RGBA(0,0,255,.66)' --s_srs=epsg:3067 *.tif index.tif Assume all map to be projected in EPSG:3067. Draw a 25-pixels wide, 50% transparent red border around each tile, and write the caption in 67% @@ -530,8 +530,8 @@ sub annotate { my ($r, $g, $b, $a) = $pix->QueryColor( $config{bordercolor} ); my $max = (2 << ($pix->Get('depth') - 1)) - 1.; undef $pix; - ($r,$g,$b,$a) = map { ($_ * 100. / $max).'%' } ($r,$g,$b,$a); - my ($b_rgb, $b_alpha) = ("RGB($r,$g,$b)", "GRAY($a)"); + ($r,$g,$b,$a) = map { $_ * 100. / $max } ($r,$g,$b,$a); + my ($b_rgb, $b_alpha) = ("RGB($r%,$g%,$b%)", 'GRAY('.(100-$a).'%)'); my $rgb= Image::Magick::->new( size => "${width}x${height}" ); $rgb->Read( 'xc:none' ); -- cgit v1.2.3