diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp index dc88b8249..d06a3ee6d 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp @@ -474,9 +474,9 @@ ROSImageTexture::setFormatAndNormalizeDataIfNecessary( return ImageData(Ogre::PF_BYTE_L, data_ptr, data_size_in_bytes, false); } else if (encoding == sensor_msgs::image_encodings::TYPE_32FC1) { return convertTo8bit(data_ptr, data_size_in_bytes); - } else if (encoding == sensor_msgs::image_encodings::YUV422) { + } else if (encoding == sensor_msgs::image_encodings::UYVY) { return convertYUV422ToRGBData(data_ptr, data_size_in_bytes); - } else if (encoding == sensor_msgs::image_encodings::YUV422_YUY2) { + } else if (encoding == sensor_msgs::image_encodings::YUYV) { return convertYUV422_YUY2ToRGBData(data_ptr, data_size_in_bytes); } else { throw UnsupportedImageEncoding(encoding);