Changeset 718


Ignore:
Timestamp:
Feb 7, 2010, 4:33:59 PM (10 years ago)
Author:
Nick Burch
Message:

Make sure the thumbnails are always of a suitable size, otherwise when we crop it all goes wrong...

File:
1 edited

Legend:

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

    r707 r718  
    2424use List::Util qw[min max];
    2525use Image::Magick;
     26use POSIX qw[ceil];
    2627use strict;
    2728
     
    5556$maxx = max(keys %tiles) + 1;
    5657$maxy = max(map { max(keys %{$tiles{$_}})} keys %tiles) + 1;
     58
     59# Ensure it's always big enough for our trims not to confuse things
     60$maxx = max($maxx, ceil($tr_trims[0]/$inscale));
     61$maxy = max($maxy, ceil($tr_trims[1]/$inscale));
    5762
    5863# Decide how big our intermediate, and final images will be
Note: See TracChangeset for help on using the changeset viewer.