convert image to RGB