inspector-bokeh
inspector-bokeh copied to clipboard
Canvas-based blur detection with JavaScript
Inspector Bokeh
Experimental JavaScript library to measure blur in images. Try out the live demo or read this blog post to find out more.
Setup
- You need Node.js.
- Make sure Cairo is installed in your system, the canvas module requires this. How to install node-canvas.
- On OS X or macOS with Homebrew:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
- On OS X or macOS with Homebrew:
npm install
Usage
Simply run npm start path/to/image/file.jpg
Troubleshooting
On macOS 12 Monterey: canvas.node can’t be opened
Full error message:
“canvas.node” can’t be opened because Apple cannot check it for malicious software.
This software needs to be updated. Contact the developer for more information.
- If this error pops up, click
Show in Finder. - Right-click the file
canvas.node, selectOpen withand chooseOther.... - Make sure
Enable: All Applicationsis selected. Pick/Applications/Utilities/Terminal.app(the default macOS Terminal). - Confirm that you really want to open it.
- Run
npm start path/to/image/file.jpgagain - this time anOpenbutton will be displayed in the dialog. - After choosing
Openonce, subsequent attempts of running the script will work without showing any dialog.
This possibly happens only if you cloned this repo onto a Volume mounted from a disk image file (.dmg). The reason is macOS' Gatekeeper trying to protect you from running software from an "unidentified developer".