The ros_compressed format requires the message's format field to be exactly "jpeg" (code here). However, the formats "jpeg" and "jpg" are equivalent, and some ROS libraries (e.g., cv_bridge) output compressed images with the format field set to "jpg" by default. Therefore, to improve usability for users who need to use web_video_server with compressed images outputted by cv_bridge, I think web_video_server should also accept the "jpg" format.
Suggested fix: Over here add an additional check for the "jpg" format, setting the content type to "image/jpeg" in that case.
The
ros_compressed
format requires the message'sformat
field to be exactly "jpeg" (code here). However, the formats "jpeg" and "jpg" are equivalent, and some ROS libraries (e.g., cv_bridge) output compressed images with the format field set to "jpg" by default. Therefore, to improve usability for users who need to useweb_video_server
with compressed images outputted by cv_bridge, I thinkweb_video_server
should also accept the "jpg" format.Suggested fix: Over here add an additional check for the "jpg" format, setting the content type to "image/jpeg" in that case.