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

crunchitize

v1.3.0

Published

Turn images into Crunch textures (.crn)

Downloads

28

Readme

About

Crunchitize is a tool to assist in making Crunch compressed DXT textures. It currently converts PNG images, and by default makes them pre-multiplied to be friendly to pixi.js. If it finds a .json file with the same name as a converted .png, it also modifies that json file's meta.image property to point at the new texture file instead of the (assumed) png. Crunchitize can resize your images for you, but the output texture must have dimensions that are each a multiple of 4.

Usage:

-f, --files  Glob path or path to .txt file list of glob paths to .pngs to process.
-q, --quality  Quality of crunch output, 0-1. Default is 0.5.
-pm, --premultiplied  If the input pngs should be converted to premultiplied alpha images first. Default is true.
-n, --noise  Strength of noise to apply to image before processing, from 0-1 (small numbers suggested). Default is 0.
--format  'crn' for .crn, or 'dds' for .dds. Default is 'crn'.
-d, --deleteInput  If the input pngs should be deleted after being converted. Default is false.
-r, --resize  How to resize input images to be multiple of 4 dimensions. Options are 'scale' to scale up, 'border' to add transparency to the right and bottom. The default is to not resize, and skip invalid images.

Convert a single file

crunchitize -f path/to/my.png

Convert all .pngs in a folder, at max quality

crunchitize -f path/to/folder/ -q 1

Convert all .pngs in a folder to dds

crunchitize -f path/to/folder/ --format dds

Convert all listed images at varying qualities

list.txt:

path/to/my.png 0.8
path/to/other.png 0.3 scale
path/to/another.png border

shell:

crunchitize -f path/to/list.txt

Executables for the crunch compression itself are taken from https://github.com/BKcore/crunch-osx.