Use copyToImageData to get the data to handle non-RGB color models