Changeset 412 for trunk/npemap.org.uk
- Timestamp:
- Dec 10, 2006, 7:00:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/scripts/tile-processing/makeThumbImage.pl
r410 r412 1 1 #!/usr/bin/perl 2 2 # Generate the "whole of the UK" thumbnail from lots of files in scaled50 3 # Doesn't need corners.csv, but does need scaled50/4 3 5 4 use List::Util qw[min max]; … … 24 23 } 25 24 26 25 # No 000, but there is ???/000.jpg 27 26 $maxx = max(keys %tiles); 28 $maxy = max(map { max(keys %{$tiles{$_}})} keys %tiles) ;27 $maxy = max(map { max(keys %{$tiles{$_}})} keys %tiles) + 1; 29 28 30 29 # Decide how big our intermediate, and final images will be … … 45 44 46 45 foreach my $x (1..($maxx)) { 47 foreach my $y ( 1..($maxy)) {46 foreach my $y (0..($maxy)) { 48 47 my $input = $tiles{$x}{$y}; 49 48 if(-f $input) { … … 51 50 my $image = Image::Magick->new; 52 51 print $image->Read($input); 53 print $out->Composite(image=>$image, x=>(($x-1)*$tilesize), y=>(($y-1)*$tilesize)); 52 53 # x goes from 1 to n 54 my $this_x = ($x-1) * $tilesize; 55 # y goes from 0 to n 56 my $this_y = $temp_y - (($y+1) * $tilesize); 57 print " goes at $this_x , $this_y\n"; 58 59 print $out->Composite(image=>$image, x=>$this_x, y=>$this_y); 54 60 undef $image; 55 61 }
Note: See TracChangeset
for help on using the changeset viewer.