samdobson / image_slicer

Split images into tiles. Join the tiles back together.
http://samdobson.github.io/image_slicer
MIT License
151 stars 73 forks source link

`slice-image` argument parsing bug: "num_tiles: invalid int value: ..." #13

Open ArniDagur opened 5 years ago

ArniDagur commented 5 years ago

The command slice-image --dir slices *.jpg 9 results in:

usage: slice-image [-d DIR] [-f FORMAT] [-h] [-v] image num_tiles
slice-image: error: argument num_tiles: invalid int value: '0012tQn.jpg'

I tried making a shell script to avoid using glob:

find $(pwd) -maxdepth 1 -type f -name '*.png' -o -name '*.jpg' |
while read filename; do
    slice-image --output slices/ $filename 9 +
done

But I still get the same error:

usage: slice-image [-d DIR] [-f FORMAT] [-h] [-v] image num_tiles
slice-image: error: argument num_tiles: invalid int value: '/home/arni/colorize/DeOldify/training_images/006HsNn.jpg'
usage: slice-image [-d DIR] [-f FORMAT] [-h] [-v] image num_tiles
slice-image: error: argument num_tiles: invalid int value: '/home/arni/colorize/DeOldify/training_images/022SLOl.jpg'
usage: slice-image [-d DIR] [-f FORMAT] [-h] [-v] image num_tiles
slice-image: error: argument num_tiles: invalid int value: '/home/arni/colorize/DeOldify/training_images/234UW9T.jpg'