RobotWebTools / web_video_server

HTTP Streaming of ROS Image Topics in Multiple Formats
http://ros.org/wiki/web_video_server
Other
269 stars 187 forks source link

Fix Width & Height Bug #130

Open amalnanavati opened 1 year ago

amalnanavati commented 1 year ago

Public API Changes

None

Description

Before this PR the user-specified width and height parameters were getting overridden by the image's default width and height, preventing user-specified re-sizing. This bug was introduced in this commit. This PR addresses that bug by reverting to the functionality that user-specified width and height had before that commit.

In service of #119 .

Combinacijus commented 1 year ago

Thank you so much!

I tested this code and can confirm that it works and should be merged.

Without this fix network usage won't change even when you change width and height parameters in MJPEGCANVAS.Viewer on your website:

      this.cameraViewer = new MJPEGCANVAS.Viewer({
        divID: "camera-stream",
        host: this.cameraAddress,
        width: 640,
        height: 480,
      });

After the fix network usage changes with resolution change. Measure with Chrome Dev Tools Network tab