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

dimpic

v1.0.2

Published

A command line tool for resizing image dimensions and file size

Downloads

2

Readme

Dimpic - Image Resizer and Compressor

Dimpic is a simple command-line tool for resizing the dimensions of an image and reducing its file size. This README provides an overview of its features, installation instructions, usage guide, and how to contribute to the project.

Features

  • Crop images to a given dimension.
  • Reduce image file sizes(lossless and lossy).
  • Compress and resize or crop images.
  • Ability to specify output name and location.
  • Convert PNG to JPEG or JPEG to PNG by changing the extension when providing an output name.
  • Supports JPEG and PNG image formats.
  • Compress multiple images at once.

Installation

You can install Dimpic locally or globally using npm. To install it, run the following command:

npm install -g dimpic

Usage

To use Dimpic, simply run the dimpic command in your terminal with the input image(s) you want to process and any desired options. The basic usage format is as follows:

dimpic <input-image...> [options]

Options

  • -q, --quality: Specify the quality of the output image for lossy compression.
  • -w, --width: Specify the output image width.
  • -h, --height: Specify the output image height.
  • -o, --out: Specify the destination and/or rename the output file. By default, the output filename is <input-filename>_dim.ext.
  • --help: Display the help menu.

Examples

  1. Compress an image while maintaining its dimensions:

    dimpic img.jpg
  2. Reduce the quality of an image and save it to a specific location:

    dimpic photo.jpg -q 40 -o ~/Desktop/
  3. Process multiple images at once and specify an output directory:

    dimpic pic1.png pic2.jpg pic3.jpg -o /home/username/Document/
  4. Resize an image to a specific width and height and specify the output file name:

    dimpic photo2.png --width=1024 -h 720 --out ./new/my_photo.jpg

Screenshots

Before

Image Before

  • File Size: 1.3 MB

After

Image After

  • File Size: 406.8 KB

Contributing

If you would like to contribute to Dimpic, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure that the tests pass.
  4. Submit a pull request to the main branch of the original repository.

Your contributions will be reviewed, and if they align with the project's goals, they will be merged. Thank you for your support and contributions to Dimpic!

Dependencies

Dimpic relies on the following npm packages:

  • imagemin
  • imagemin-mozjpeg
  • imagemin-pngquant
  • sharp
  • commander

Make sure to have these dependencies installed when using Dimpic.


Dimpic is a versatile tool for image resizing and compression. Feel free to explore its capabilities and customize your image processing tasks effortlessly. If you encounter any issues or have suggestions for improvements, please don't hesitate to reach out.

Happy image processing with Dimpic!