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

pixelify-image

v1.0.10

Published

It is a JS module for pixelify multiple images. This can also be used for creating/previewing arduino matrix LED which uses an array of color codes as input.

Downloads

14

Readme

pixelify-image

It is a JS module for pixelify multiple images. This can also be used for creating/previewing arduino matrix LED which uses an array of color codes as input.

You can have a pixelified image saved on your computer OR see the converted color code data OR check out how the matrix LED will look like using terminal.

Usage

With Installation

  • install the package
npm i pixelify-image
  • to use in your project
import { pixelify } from 'pixelify-image'

const { imagePixelContainer } = await pixelify('path/to/image.png', { width: matrixWidth, height: matrixHeight })

// imagePixelContainer contains an array of color codes and brightness/intensity in it

Without Installation

  • PLEASE keep in mind

    • BOTH "remote" and "local" path can be used with --convert-data && --convert-preview
    • ONLY "local" path can be used with --convert-save
  • To save the result image (LOCAL)

# The path coming after "default" must be an absolute path and it MUST be local
# It will create an output image in the same path of the input image
# the output image will be named as 'original image name' + '_pixelified.png'

npx pixelify-image --convert-save default '/Users/doehoonlee/Documents/Projects/Personal/img-pixelify/examples/HEART.png'
  • To get the color codes
# Below example uses a remote image
# When using an image in local, the path following after "default" must be an absolute path
# Converted color codes can be used as input for arduino matrix LED

npx pixelify-image --convert-data default 'https://raw.githubusercontent.com/DOEHOONLEE/img-pixelify/main/examples/HEART.png'
  • To see/preview of a pixelified image or how it will look like on arduino matrix LED
npx pixelify-image --convert-preview default 'https://raw.githubusercontent.com/DOEHOONLEE/img-pixelify/main/examples/HEART.png'
  • Multiple commands can be used with all commands
npx pixelify-image --convert-preview default 'https://raw.githubusercontent.com/DOEHOONLEE/img-pixelify/main/examples/HEART.png' 'https://raw.githubusercontent.com/DOEHOONLEE/img-pixelify/main/examples/pinkHeart.png' 'https://raw.githubusercontent.com/DOEHOONLEE/img-pixelify/main/examples/square.png'
Sample Arduino Matrix LED built with pixelify-image