diff options
Diffstat (limited to 'mkindex.pl')
-rwxr-xr-x | mkindex.pl | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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' ); |