def METHOD_NAME(img, bridge):
    image = Image()
    image.width = img.width
    image.height = img.height
    image.format = "BGR8"
    image.timeStamp = img.header.stamp.secs + (img.header.stamp.nsecs * 1e-9)
    cv_image = 0
    if (img.encoding[-2:] == "C1"):
        gray_img_buff = bridge.imgmsg_to_cv2(img, img.encoding)
        cv_image = depthToRGB8(gray_img_buff, img.encoding)
    else:
        cv_image = bridge.imgmsg_to_cv2(img, "bgr8")
    image.data = cv_image
    return image