mirror of
https://github.com/ColonelParrot/jscanify.git
synced 2025-12-30 22:31:52 +00:00
Ensure demo image is loaded before extracting paper.
This commit is contained in:
parent
eecb41ff37
commit
196e8393aa
@ -32,11 +32,13 @@ $('#demo-images .image-container').click(function () {
|
||||
const newImg = document.createElement("img")
|
||||
newImg.src = imageSrc
|
||||
|
||||
newImg.onload = function(){
|
||||
scanner.extractPaper(newImg, 386, 500, (resultCanvas) => {
|
||||
$('#demo-result').append(resultCanvas);
|
||||
|
||||
const highlightedCanvas = scanner.highlightPaper(newImg)
|
||||
$('#demo-result').append(highlightedCanvas);
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user