1.0.3 • Published 6 years ago
epub-cover-extractor v1.0.3
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
*/
});