From 0671cb18dff09fc6fb416a6f15becafa99c4d70f Mon Sep 17 00:00:00 2001 From: Tina Tian <31605482+Te12944265-AMAHA@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:52:47 -0400 Subject: [PATCH] Add support for jpg compression format (#142) --- src/ros_compressed_streamer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ros_compressed_streamer.cpp b/src/ros_compressed_streamer.cpp index eedcf0d..e1a142e 100644 --- a/src/ros_compressed_streamer.cpp +++ b/src/ros_compressed_streamer.cpp @@ -36,7 +36,7 @@ void RosCompressedStreamer::sendImage(const sensor_msgs::CompressedImageConstPtr const ros::Time &time) { try { std::string content_type; - if(msg->format.find("jpeg") != std::string::npos) { + if(msg->format.find("jpeg") != std::string::npos || msg->format.find("jpg") != std::string::npos) { content_type = "image/jpeg"; } else if(msg->format.find("png") != std::string::npos) {