Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Width & Height Bug #130

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

amalnanavati
Copy link

@amalnanavati amalnanavati commented Sep 16, 2022

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 .

@amalnanavati amalnanavati changed the title Fixed Resize Bug Fix Resize Bug Sep 16, 2022
@amalnanavati amalnanavati changed the title Fix Resize Bug Fix Width & Height Bug Sep 16, 2022
@Combinacijus
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants