Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukasbach/ires
A commandline tool for duplicating and resizing image files.
https://github.com/lukasbach/ires
Last synced: 8 days ago
JSON representation
A commandline tool for duplicating and resizing image files.
- Host: GitHub
- URL: https://github.com/lukasbach/ires
- Owner: lukasbach
- Created: 2018-04-24T18:38:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T18:48:00.000Z (over 6 years ago)
- Last Synced: 2024-09-28T23:05:13.215Z (about 1 month ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# IRES
*ires* (Image resizer) is a commandline tool, which can be used to resize arbitrary
quantities of images into arbitrary quantities of target image sizes.## Installing and running
[node.js](https://nodejs.org/en/download/) and npm are required for the tool to run.
To install globally , run
npm install -g ires
Then, use the commandline tool *ires* to process arbitrary quantities
of images into differently sized image files.ires -i input.png --sizes 16 32 64
Will create the files
input_16.png
input_32.png
input_64.png
With the respective sizes.## Arguments
* *-i*, *--input* **filenames...**
will use the given paths to files as input files, which will be processed.
The image files are separated by spaces.
Example: *--input file1.png file2.png file3.png*
* *--sizes* **sizes...**will use the given image sizes as output image sizes. The sizes are separated
by spaces and are either an integer, describing both width and height for a square
image, or have the format *wxh*, where *w* is the width in pixels and *h* is the
height in pixels.
Example: *--sizes 16 32 48x64*
* *-o*, *--outname* **outname**
is the name of the output files. Several placeholders can be used to differentiate
the files:
* *{filename}*: The original filename, without the extension.
* *{extension}*: The original fileextension.
* *{width}*: The width of the currently processed size.
* *{height}*: The height of the currently processed size.
* *{fileindex}*: The index of the file currently processed. For example, if files
a.png, b.png, c.png, d.png have been entered as input files and currently file c.png
is being processed, this placeholder will have the value 2.
* *{sizeindex}*: The index of the size currently processed. For exmaple, if sizes
16, 32, 64 have been entered as output sizes, and the current file is being resized
to size 16x16, this placeholder will have the value 0.
Examples:
ires -i a.png b.png --sizes 10x15 20x25 -o {filename}-{extension}.{fileindex}.{sizeindex}-{width}x{height}
Will render the files:
a-png.0.0-10x15.png
a-png.0.1-20x25.png
b-png.1.0-10x15.png
b-png.1.1-20x25.png