npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ires

v1.0.1

Published

A commandline tool for duplicating and resizing image files.

Downloads

1

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 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