Automatic colorspace and format conversion