Work-around ZeroDivisionError when img_px_size is 0