Skip to content

Commit e8156cb

Browse files
Te12944265-AMAHAtlwong3
authored andcommitted
Add support for jpg compression format (RobotWebTools#142)
1 parent 1a022f6 commit e8156cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ros_compressed_streamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void RosCompressedStreamer::sendImage(const sensor_msgs::CompressedImageConstPtr
3737
const ros::Time &time) {
3838
try {
3939
std::string content_type;
40-
if(msg->format.find("jpeg") != std::string::npos) {
40+
if(msg->format.find("jpeg") != std::string::npos || msg->format.find("jpg") != std::string::npos) {
4141
content_type = "image/jpeg";
4242
}
4343
else if(msg->format.find("png") != std::string::npos) {

0 commit comments

Comments
 (0)