Extract cover images from ePub documents.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json

README.md

epub-cover-extractor

Extract cover images from ePub documents.

npm version badge

Installation

To install via npm:

npm install epub-cover-extractor

Usage

Import

var extractCover = require('epub-cover-extractor');

Extract Cover Image from File

extractCover.fromFilePath(filePath, './', function(err, filePath){
  if (err) throw err;
  console.log(filePath);
  /*
  cover-image-filename.jpg
  */
});

Extract Cover Image from Buffer

extractCover.fromBuffer(buffer, './', function(err, filePath){
  if (err) throw err;
  console.log(filePath);
  /*
  cover-image-filename.jpg
  */
});