Add image conversion exception handling.