catch IndexError when creating thumbnail

happened on broken PNGs