Changeset 412


Ignore:
Timestamp:
Dec 10, 2006, 7:00:58 PM (13 years ago)
Author:
Nick Burch
Message:

Add scaled50 at the right place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/scripts/tile-processing/makeThumbImage.pl

    r410 r412  
    11#!/usr/bin/perl
    22# Generate the "whole of the UK" thumbnail from lots of files in scaled50
    3 # Doesn't need corners.csv, but does need scaled50/
    43
    54use List::Util qw[min max];
     
    2423}
    2524
    26 
     25# No 000, but there is ???/000.jpg
    2726$maxx = max(keys %tiles);
    28 $maxy = max(map { max(keys %{$tiles{$_}})} keys %tiles);
     27$maxy = max(map { max(keys %{$tiles{$_}})} keys %tiles) + 1;
    2928
    3029# Decide how big our intermediate, and final images will be
     
    4544
    4645foreach my $x (1..($maxx)) {
    47         foreach my $y (1..($maxy)) {
     46        foreach my $y (0..($maxy)) {
    4847                my $input = $tiles{$x}{$y};
    4948                if(-f $input) {
     
    5150                        my $image = Image::Magick->new;
    5251            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);
    5460            undef $image;
    5561        }
Note: See TracChangeset for help on using the changeset viewer.