Search code examples
pythonimageimage-processingimage-stitching

Stitch images together from html


This website has a large image combrised of 132 images, I want to find a way to stitch them together into a single image. I know some python if anyone has a clue where to start.

http://www.mapytatr.net/PRODUKTY/MAPY_TAT/WYSOKIE/SLICES/wys_ii.htm

Thanks! Matt


Solution

  • Forget Python - use ImageMagic (http://www.imagemagick.org/)

    +append to create row

    convert tpn_1.jpg tpn_2.jpg tpn_3.jpg +append row_1.jpg
    

    -append to create column

    convert row_1.jpg row_2.jpg row_3.jpg -append final.jpg
    

    You can try also montage (from ImageMagic too) to get all in one command

    montage -mode concatenate -tile 3x3 tpn_* final.jpg
    

    BTW: on Linux you can download all images using wget and for in bash

    for i in $(seq 132); do echo "http://www.mapytatr.net/PRODUKTY/MAPY_TAT/WYSOKIE/SLICES/tpn_$i.jpg"; done | wget -i -
    

    kochane tatry

    kochane tatry :)