Source: https://github.com/barrycarter/bcapps/blob/master/MAPS/bc-image-from-tiles.pl
See also: https://github.com/barrycarter/bcapps/blob/master/MAPS/