image: dont crash if an invalid image is loaded. closes #1561