web_video_server icon indicating copy to clipboard operation
web_video_server copied to clipboard

Accept `jpg` format for `ros_compressed`

Open amalnanavati opened this issue 1 year ago • 0 comments

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.

amalnanavati avatar Nov 05 '23 21:11 amalnanavati