Add support for different types of images, case in which the sequence does not start from image '0', and raising exceptions in case of mistakes.

always be precise with spacing:
```python
list_im =sorted([ int(x) for x in image_names])
        |        |
        v        v
list_im = sorted([int(x) for x in image_names])
```