Here is the first in a series of panorama pictures I've worked on over the past years. This is of Zurich, taken from Üetliberg. It is composed of 211 single 15 MP pixels, and the result is an image of 33585x6832 pixels or 230 MP.
It was stitched using the open source panorama tool Hugin, and split into tiles using ImageMagick. The panorama is rendered using a home made HTML 5 Canvas viewer. If you're interested, the source is open source under GPL 3.
The ImageMagick commands are worth a closer look. As mentioned, the complete image is 230 MP, and to serve scaled tiles, it useful to work with something smaller. Five different scales were created from the original. Here is the basic resize command to 50%:
convert input.tif -resize 50% output_50.tif
Next, each of the resized images were tilled following the excellent instructions on the IM site. They were cropped to equal tiles, so there is only a +1 pixel difference between some of the tiles. For the current panorama, I've chosen to ignore that difference, and render based on the smallest.
The following gives 49 columns and 8 rows, with the first top left hand tile starting with filename tile_0.jpg. It is worth noting that not all tile sizes worked; in some cases only the first row would be produced, changing (often increasing) the tile count would work around that.
convert output_50.tif -verbose -crop 49x8@ +repage +adjoin tile_%d.jpg
Finally, I wanted to put a water mark on some of the images. Here, I also followed the IM instructions without problems. To create the "stamp", the following did it:
convert -size 300x50 xc:grey30 -font FreeSans-Medium -pointsize 20 -gravity center -draw "fill grey70 text 0,0 'Copyright'" stamp_fgnd.png
convert -size 300x50 xc:black -font FreeSans-Medium -pointsize 20 -gravity center -draw "fill white text 1,1 'hblok.net' text 0,0 'Copyright' fill black text -1,-1 'Copyright'" +matte stamp_mask.png
composite -compose CopyOpacity stamp_mask.png stamp_fgnd.png stamp.png
mogrify -trim +repage stamp.png
To apply the stamp to an image, e.g. tile_20.jpg
composite -gravity SouthEast -geometry +10+10 stamp.png tile_20.jpg watermarked.jpg