Add crop functionality to BrowserCodeReader
See original GitHub issueYou often don’t want to scan whole picture. In our case datamatrix is really small, so we want to crop and scan only the center of the picture.
I propose to add additional configuration option to BrowserCodeReader
allowing to pass crop options to drawImage
method: what should be the size of cropped picture and what would be its position in larger picture
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Implement Cropping Feature on Your Website in Under 10 Min
In this article, we will be looking at how we can implement the cropper.js plugin on a very basic website, such that when...
Read more >Build a Image Cropper With Live Preview & Download it Using ...
5.8K views 11 months ago #javascript # cropimage ... Online Tool to Crop Images Online Here: https://freemediatools.com/cropimage #cropimage ...
Read more >Cropping Images in JavaScript - Cloudinary
A common way to crop an image in JavaScript is with the HTML5 <canvas> element and then transform the image by calling the...
Read more >Croppie - a simple javascript image cropper - Foliotek
Croppie is a fast, easy to use image cropping plugin with tons of ... A class of your choosing to add to the...
Read more >Add crop functionality to the resize_image_url function.
The resize_image_url function is quite handy for preventing users from adding images of an obscene size and reducing page weight.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got this working with React - it copies a crop of the video feed onto a canvas, then copies the canvas into an image element, then feeds that to the barcode reader…
Tested on MacOS Chrome so far -
We make a crop mask with css. Here is a picture of our app:
Only stuff inside white rectangle is passed to algorithm. Since area is 4 times smaller, algorithm has much better results, than if we would pass whole picture. Scanning apps very often have masks like this.
If programmer could pass crop data to reader, he could use the same data to calculate and create mask of proper size.
The only other way to achieve this would be to write custom
BrowserCodeReader
, which we obviously would like to avoid.