Numbers Prefer Multiplication

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

    1.1.0 • Public • Published

    Node pHash Wrapper

    A wrapper for pHash using N-API and Promises.

    Supported:

    • Images (DCT and MH hashses, and respective hamming distance calculators)
    • Video (DCT hashing and distance calculator). Note that this segfaults in pHash. Possibly due to deprecated ffmpeg code.

    Usage

    For API documentation please see types/index.d.ts.

    Also see test.js for an example usage.

    TypeScript

    import pHash from 'phash2';
    console.log(pHash.info());
    

    NodeJS

    const pHash = require('phash2');
    console.log(pHash.info());
    

    Installing pHash

    See the Dockerfiles under dev for Alpine and Ubuntu setup.

    Ubuntu

    1. sudo apt-get install -y git libavcodec-dev libavformat-dev libswscale-dev libjpeg-dev libpng-dev libsndfile-dev libsamplerate-dev libtiff-dev g++ make cmake
    2. git clone https://github.com/aetilius/pHash
    3. mkdir build && cd build
    4. cmake -DWITH_AUDIO_HASH=ON -DWITH_VIDEO_HASH=ON ../pHash
    5. make -j8
    6. sudo make install

    Install

    npm i phash2

    DownloadsWeekly Downloads

    3

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    73.3 kB

    Total Files

    13

    Last publish

    Collaborators

    • tstableford