Skip to content

Commit 375fd06

Browse files
Add support for jpg compression format (backport #142) (#159)
* Add support for jpg compression format (backport #142) * Fix formatting --------- Co-authored-by: Tina Tian <[email protected]>
1 parent 140ff53 commit 375fd06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ros_compressed_streamer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ void RosCompressedStreamer::sendImage(
6262
{
6363
try {
6464
std::string content_type;
65-
if (msg->format.find("jpeg") != std::string::npos) {
65+
if (msg->format.find("jpeg") != std::string::npos ||
66+
msg->format.find("jpg") != std::string::npos)
67+
{
6668
content_type = "image/jpeg";
6769
} else if (msg->format.find("png") != std::string::npos) {
6870
content_type = "image/png";

0 commit comments

Comments
 (0)