1.0.0 • Published 5 years ago

resemble-image-cli v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

resemble-image-cli

Command-line interface for resemble-image.

Use cases

  • Generate fallback CSS gradients for images. This can be used to improve perceived performance on slower connections. See this article for examples.

Installation

Dependencies

Installing the package

Enter one of the following commands in a terminal:

# Using npm
npm install -g resemble-image-cli
# Using yarn
yarn global add resemble-image-cli

Usage

See the command-line help:

Usage: resemble-image <image> [<images...>]

Example output (the order isn't guaranteed, as it runs in parallel):

$ resemble-image 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg
2.jpg   linear-gradient(90deg, #718aaa 2%, #7d90a2 22%, #727e87 30%, #6e7063 84%)
1.jpg   linear-gradient(90deg, #19180f 10%, #353b2c 26%, #567386 60%, #567388 85%)
4.jpg   linear-gradient(90deg, #3b393c 13%, #3c393c 37%, #3b393c 49%, #3b393c 68%)
5.jpg   linear-gradient(90deg, #070707 16%, #11110f 37%, #1e1e19 58%, #070707 91%)
6.jpg   linear-gradient(90deg, #060606 13%, #0c0907 46%, #060606 66%, #131212 92%)
3.jpg   linear-gradient(90deg, #617085 15%, #606f85 52%, #72849d 86%, #758dad 92%)

License

Copyright © 2019 Hugo Locurcio and contributors

Unless otherwise specified, files in this repository are licensed under the MIT license; see LICENSE.md for more information.