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

windows-imagemagick-resizer

v1.0.13

Published

A package to resize and rename an array of images to a specified size and new name using image magick on the windows platform

Downloads

35

Readme

What is the purpose of this application?

  • The purpose of this application is to provide a simple way to resize and rename either a single file or multiple files at once inside your javascript. Basically, you don't have to result to the web to do this.

How to use this application.

1. Import app

require("windows-imagemagick-resizer/src/index.min.js");

2 Call the function

resizeImage(
  './src/images'
  ['./src/oldImages/broom-32x32.png', './src/oldImages/broom-84x84.png'],
  ['./src/newImages/broom-48x48.jpeg', './src/newImages/broom-64x64.jpeg'],
  ['48x48', '64x64']
);

Explanation of the function call above

  • All arguments must be wrapped in an array with the exception of the first which is a string, and is the starting point of where node will read your image files from.
  • The first argument is a string that is that should be typed relative to your __dirname, and is the starting point of where node will read your image files from.
  • The second argument array is a list of your old files with paths on them relative to where your __dirname directory is set to. In this example my code structure is setup so that my __dirname refers to the root directory of the application which is also likely what yours is set to.
  • The third argument array is a list of your desired file names also with the relative path on them.
  • The fourth and last array of arguments are your intended file resizes. For example, if you have an image that is 32x32, but you want it to be 72x72 then this is the location where you would type in '72x72'.

Things to look out for

  • Make sure to begin each file path with a "./"
  • Don't forget the extension type on the image paths.
  • The first argument should be relative to your __dirpath as this is the way the code finds the folder to read files from.
  • This project assumes that you are using windows. This package will not work on mac or linux.

I hope this helps someone, enjoy!