Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

refactor: replace canvas with sharp #79

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

eventualbuddha
Copy link
Collaborator

canvas does not support being loaded in worker threads due to it being a native dependency that was not written using a thread-compatible API. sharp, on the other hand, is thread-aware: lovell/sharp#1558.

canvas does not support being loaded in worker threads due to it being a native dependency that was not written using a thread-compatible API. sharp, on the other hand, is thread-aware: lovell/sharp#1558.
@@ -1614,7 +1614,7 @@ test('interpret votes', async () => {
},
Object {
"option": "Jane Bland",
"score": 0.5717884130982368,
"score": 0.5714285714285714,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The decoding of images is slightly different between canvas and sharp, so we get different scores.

@eventualbuddha eventualbuddha merged commit 7f3ab67 into main Sep 29, 2020
@eventualbuddha eventualbuddha deleted the refactor/replace-canvas-with-sharp branch September 29, 2020 18:00
@eventualbuddha eventualbuddha mentioned this pull request Sep 29, 2020
eventualbuddha added a commit to votingworks/module-scan that referenced this pull request Sep 29, 2020
eventualbuddha added a commit to votingworks/module-scan that referenced this pull request Sep 29, 2020
eventualbuddha added a commit to votingworks/vxsuite that referenced this pull request Oct 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants