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 Blurry Issue on Semantic Reader_Part1 #183

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Conversation

huytr1995
Copy link
Contributor

@huytr1995 huytr1995 commented Aug 26, 2022

Description

Recently our user noticed that the image on Semantic Reader is really blurry. This PR addresses this

Reviewer Instructions

First thing is to eliminate zoomMultiplier when it comes to canvas size because zoom multiplier is just how fast the zoom grow (like 100-120 or 120-140) so we dont need that and also rotation. Adding another SCALE_BOOST variable with default value to be 2 to increase the sharpness of our image on canvas overall (cant go more than 2 due to Safari will crash due to the way they render their canvas). The next PR will add a react.useEffect to listen for devicePixelRatio change and also scale change to repopulate the imageUrl again.

Testing Plan

Verify if the image display is more crisp compare to previous. Other than that yarn lint, format, test

Output / Screenshots

Look at how sharp the image now compare to previous
image

Since i dont have my monitor now i change the scale of my screen to simulate that
image

A11y

No A11y involvement.

@huytr1995 huytr1995 requested a review from ericmarsh995 August 26, 2022 18:59
@huytr1995 huytr1995 changed the title Fix Blurry Issue on Semantic Reader Fix Blurry Issue on Semantic Reader_Part1 Aug 26, 2022
Copy link
Contributor

@ericmarsh995 ericmarsh995 left a comment

Choose a reason for hiding this comment

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

This breaks rotation, but blur fix is more important so lets create a new issue for fixing rotation. LGTM

@huytr1995 huytr1995 merged commit b480cf6 into main Aug 26, 2022
@huytr1995 huytr1995 deleted the Huy/Fix_Blurry_Canvas branch August 26, 2022 19:37
@ericmarsh995
Copy link
Contributor

Created issue for rotation breaking #184

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