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: Screenshot quality #939

Merged
merged 5 commits into from
Aug 19, 2022
Merged

fix: Screenshot quality #939

merged 5 commits into from
Aug 19, 2022

Conversation

bitsandfoxes
Copy link
Contributor

Currently, the screenshot quality was relative to the current screen size which creates issues when a project supports a wide range of different resolutions, making "half the current resolution" on small screens barely usable.

Instead, we can map High, Medium, Low to "ranges" of resolutions akin to what Youtube videos offer.

ScreenshotQuality.Full => // Don't touch
ScreenshotQuality.High => 1920,     // 1080p
ScreenshotQuality.Medium => 1280,   // 720p
ScreenshotQuality.Low => 854,       // 480p

We take the wider side (portrait or landscape) and scale the screenshot to match while preserving the aspect ratio. (defacto @vaind's original implementation) with an user-facing enum instead of a vec2 max resolution.

Copy link
Collaborator

@vaind vaind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see this :)

@bitsandfoxes bitsandfoxes merged commit d68b107 into main Aug 19, 2022
@bitsandfoxes bitsandfoxes deleted the fix/screenshot-resolution branch August 19, 2022 14:28
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.

3 participants