image-checker
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

✔️ image-checker readme

Check the quality of an image for defects including blur, under-exposure, over-exposure and low contrast.

Can be used via node.js as a command line tool or as a library.

status - !in development!

image-checker is in very early stages of development (Windows, Linux Ubuntu) following semantic versioning.

Please come back later!

Travis Coveralls node

Greenkeeper badge Dependencies Dev Dependencies

npm Package NPM Downloads

styled with prettier semantic-release

License: MIT Donate

why?

Node.js seems to lack a library that indicates the quality of an image.

Hopefully using this library/cli, you can save some time spent on manually inspecting photos!

dependencies

  • Node 8.11.3 or higher

features (in development!)

  • library to give quality measurements of a given image
  • also can be used as CLI (command line tool)
  • gives a score for the following quality measures:
    • blurring (via edge width detection)
    • under exposure (via histogram)
    • over exposure (via histogram)
    • low contrast (via histogram)

possible future features

faces:

  • face alignment (e.g. are eyes horizontal)
  • Face not centered
  • Face out of frame
  • Faces detected, but no strong sentiment

printing:

  • dpi not high enough for A4 or photo print
  • check exif for presence of sRGB

usage - as cli (command line tool)

1 Install dependencies

Install:

  • Yarn
  • Node 8.3.11 (or higher)

2 Check images

3 ways to run

You can run image-checker in one of three ways:

  • a) as a globally installed command line tool (this is the easiest way)
  • OR b) as an npm package inside an npm project
  • OR c) from the source code
a) install globally as a command line tool

npm i -g image-checker@latest --production

On Ubuntu, you may need administrator permissions via sudo:

sudo npm i -g image-checker@latest --production

To use:

image-checker <path to image>

OR b) from the npm package

Install inside your npm project:

yarn add image-checker

via bash script:

node_modules/image-checker/dist/lib/cli.js <path to image>

OR via node:

node node_modules/image-checker/dist/lib/main <path to image>

OR c) from the source code
yarn

On Windows: use a bash shell like git bash.

To test your installation:

./test.sh

To check your images:

./go.sh <path to image>

example:

./go.sh ../myPhotos/photo-1.jpg

To see more detailed usage info:

./go.sh

usage - as a library in a node based project

Install inside your npm project:

yarn add image-checker

Then in TypeScript, you can import the library:

import * as ic from "image-checker";

// TODO xxx

For a working example, see the library test harness.

sites

site URL
source code (github) https://github.com/mrseanryan/image-checker
github page https://mrseanryan.github.io/image-checker/
npm https://www.npmjs.com/package/image-checker

developing code in this repository

see the contributing readme.

origin

This project is based on the excellent seeder project typescript-library-starter.

ORIGINAL readme (from the seeder project)

see here

authors

Original work by Sean Ryan - mr.sean.ryan(at gmail.com)

licence = MIT

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i image-checker

Weekly Downloads

12

Version

1.0.5

License

MIT

Unpacked Size

32.2 kB

Total Files

19

Last publish

Collaborators

  • seanius