Support for samples and malformed images