Skip to content

Instantly share code, notes, and snippets.

@danfisher85
Created August 1, 2019 11:47
Show Gist options
  • Save danfisher85/1218758b4a933b532ee6ddd7276f1745 to your computer and use it in GitHub Desktop.
Save danfisher85/1218758b4a933b532ee6ddd7276f1745 to your computer and use it in GitHub Desktop.
var jimp = require('gulp-jimp');
// Adds effect on all samples images.
gulp.task('jimp', function() {
gulp.src([
PATHS.export_src_img + '/samples/**/*.{png,gif,jpg}',
PATHS.export_build_img + '/samples/**/*.{png,gif,jpg}'
], {
base: '.'
})
.pipe(jimp({
'': {
posterize: 2,
greyscale: true
}
})).pipe(gulp.dest('./'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment