updating code to BGR color order for image data