Solved by ptrblck in post #2 
              
              
                Based on the error it seems that this particular bounding box has a width of 0, so you might want to filter out these images.