gulp-jpeg-2000
v1.1.4
Published
A gulp plugin for converting images to JPEG 2000 (JP2)
Downloads
62
Maintainers
Readme
gulp-jpeg-2000
A gulp plugin for converting images to JPEG 2000 (JP2) using ImageMagick
Installation
$ yarn add gulp-jpeg-2000 -D
$ npm i gulp-jpeg-2000 -D
ImageMagick
Make sure you have ImageMagick with the legacy tools installed on your system. This plugin uses ImageMagick's legacy command $ convert
that was changed to $ magick convert
in version 7.
macOS
Using Homebrew:
$ brew install imagemagick
Run $ convert -version
to ensure the version you've installed includes the legacy command. If you get an error from this command, try $ brew install imagemagick@6
.
Ubuntu
Run $ convert -version
to see if ImageMagick is already installed. If not, use apt:
$ apt install imagemagick
Windows
Download ImageMagick. Check "install legacy tools" when installing.
Run $ convert -version
to ensure the legacy command was sym linked.
Example
var gulp = require('gulp');
var jp2 = require('gulp-jpeg-2000');
function convertJP2() {
return gulp.src('src/images/**/*.{jpg,jpeg,png}')
.pipe(jp2())
.pipe(gulp.dest('dist/images'));
}
License
MIT © Courtney Pattison