fixed error handling for broken full-color images
(cherry picked from commit 796937043871aadbd0c0dc61bc90ea674ec1bc18)