Skip to content

Commit

Permalink
Add support for jpg compression format (backport #142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Te12944265-AMAHA authored and bjsowa committed Oct 3, 2024
1 parent 140ff53 commit f5b891a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ros_compressed_streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ void RosCompressedStreamer::sendImage(
{
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) {
content_type = "image/png";
Expand Down

0 comments on commit f5b891a

Please sign in to comment.