I'm pretty sure that this won't actually work, see my other comments about how the get_icc_profile function doesn't correctly return the pointer to the ICC data.