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

Dissociate virtual display size and capture size #5506

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented Nov 20, 2024

Allow capturing virtual displays at a lower resolution using -m/--max-size.

In the original implementation in #5370, the virtual display size was necessarily the same as the capture size. The --max-size value was only allowed to determine the virtual display size when no explicit size was provided.

Since the dpi was scaled down accordingly, it is often better to create a virtual display at the target capture size directly. However, not everything is rendered according to the virtual display DPI. For example, a page in Firefox is rendered too big on small virtual displays. Thus, it makes sense to be able create a virtual display at a given size, and capture it at a lower resolution with --max-size. This is now possible using OpenGL filters.

Therefore, change the behavior of --max-size for virtual displays:

  • it does not impact --new-display without size argument anymore (the virtual display size is the main display size);
  • it is used to limit the capture size (whether an explicit size is provided or not).

This new behavior is consistent with main display capture.

@Withoutruless This is the behavior you requested here: #5370 (comment)

@Withoutruless
Copy link

i tried it out and it works just fine, thank you rom1v.

are you going to merge this?

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 21, 2024

i tried it out and it works just fine

👍 Thank you for the test!

are you going to merge this?

Yes.

Allow capturing virtual displays at a lower resolution using
-m/--max-size.

In the original implementation in #5370, the virtual display size was
necessarily the same as the capture size. The --max-size value was only
allowed to determine the virtual display size when no explicit size was
provided.

Since the dpi was scaled down accordingly, it is often better to create
a virtual display at the target capture size directly. However, not
everything is rendered according to the virtual display DPI. For
example, a page in Firefox is rendered too big on small virtual
displays. Thus, it makes sense to be able create a virtual display at a
given size, and capture it at a lower resolution with --max-size. This
is now possible using OpenGL filters.

Therefore, change the behavior of --max-size for virtual displays:
 - --max-size does not impact --new-display without size argument
   anymore (the virtual display size is the main display size);
 - it is used to limit the capture size (whether an explicit size is
   provided or not).

This new behavior is consistent with main display capture.

Refs #5370 comment <#5370 (comment)>
Refs #5370 <#5370>
PR #5506 <#5506>
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