This repository was archived by the owner on Jul 20, 2023. It is now read-only.
fix(samples): use pureimage instead of canvas#774
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
+ Coverage 97.82% 97.89% +0.06%
==========================================
Files 15 15
Lines 13759 13759
Branches 592 592
==========================================
+ Hits 13460 13469 +9
+ Misses 294 285 -9
Partials 5 5
Continue to review full report at Codecov.
|
2081931 to
4ff427d
Compare
JustinBeckwith
approved these changes
May 6, 2020
Contributor
|
This is lovely |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The face detection sample in Vision uses
canvasmodule to draw rectangles to highlight faces. One problem here is thatcanvashas a binary dependency, usesnode-gyp, falls back to compilation of the native code, and started failing :)So... there is this new module called
pureimagewhich is at version 0.2.1 at this time and has just 1250 weekly downloads, and I would've never picked it but... it's written in pure JavaScript, and seems like it does its job! For our simple task of drawing a rectangle over the face, it just works, and with only small code changes (and even better promise interface thancanvas).What do you think?
(this is a picture from our samples, after face detection, with a rectangle drawn by
pureimage)