Skip to content

Commit

Permalink
Add support for jpg compression format (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Te12944265-AMAHA authored Oct 1, 2024
1 parent 047857a commit 0671cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ros_compressed_streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0671cb1

Please sign in to comment.