Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

epub-cover-extractor

1.0.3 • Public • Published

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
  */
});

install

npm i epub-cover-extractor

Downloadsweekly downloads

123

version

1.0.3

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar