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

ikona

v0.16.1

Published

Image processing CLI

Downloads

7

Readme

Ikona (Εικόνα)

CLI tool for image processing

Brush

Install & Run

sudo npm install -g ikona

Then from your command line just type ikona

Now you can use the following commands:

Commands

###help [command]

Displays helpful information for a command. e.g. help resize

Example

help resize

HELP

###exit

Exits from the cli

###resize <imageDir>

Resizes an image.

Example

resize realcat.jpg -h 200 -w 200 -o resizecat

Cat Cat2

Options

Option|Description|| -----------|----------|---------- |-h|The height of the new image|Optional, default="auto"| |-w|The width of the new image|Optional, default="auto"| |-o|The name of the new file|Optional, default="chroma.jpg"| |-m|The algorithm that will be used for resizing|[Bilinear, Nearest_Neighbor, Bicubic, Hermite, Bezier], default=Bilinear|

###scale <imageDir>

Scale an image by the given factor

Example

scale realcat.jpg -f 1.5 -o bigcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-f|Scale factor|Optional, default=2| |-o|The name of the new file|Optional, default="chroma.jpg"| |-m|The algorithm that will be used|[Bilinear, Nearest_Neighbor, Bicubic, Hermite, Bezier], default=Bilinear|

###scaletofit <imageDir>

Scale the image to the largest size that fits inside the given width and height

Example

scaletofit realcat.jpg -h 450 -w 500 -o scaletofitcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-h|The height of the new image|Optional, default="auto"| |-w|The width of the new image|Optional, default="auto"| |-o|The name of the new file|Optional, default="chroma.jpg"| |-m|The algorithm that will be used|[Bilinear, Nearest_Neighbor, Bicubic, Hermite, Bezier], default=Bilinear|

###cover <imageDir>

Scale the image to the given width and height, some parts of the image may be clipped

Example

cover realcat.jpg -h 300 -w 100 -o covercat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-h | The height of the new image | Optional, default="auto"| |-w | The width of the new image | Optional, default="auto"| |-o | The name of the new file | Optional, default="chroma.jpg"| |-m | The algorithm that will be used | [Bilinear, Nearest_Neighbor, Bicubic, Hermite, Bezier], default=Bilinear|

###contain <imageDir>

Scale the image to the given width and height, some parts of the image may be letter boxed

Example

contain realcat.jpg -h 200 -w 250 -o containcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-h | The height of the new image | Optional, default="auto"| |-w | The width of the new image | Optional, default="auto"| |-o | The name of the new file | Optional, default="chroma.jpg"|

###swap <imageDir> <channel1> <channel2>

Swap the color channels of an image

Example

swap realcat.jpg green blue

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-h | The height of the new image | Optional, default="auto"| |-w | The width of the new image | Optional, default="auto"| |-o | The name of the new file | Optional, default="chroma.jpg"| |-m | The algorithm that will be used for resizing | [Bilinear, Nearest_Neighbor, Bicubic, Hermite, Bezier], default=Bilinear|

###crop <imageDir>

Crop an image on the given points

Example

crop realcat.jpeg -x 20 -y 20 -h 70 -w 70 -o croppedcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-x | Starting point in the x axis | Optional, default=0| |-y | Starting point in the y axis | Optional, default=0| |-h | The height of the new image | Optional, default=250| |-w | The width of the new image | Optional, default=250| |-o | The name of the new file | Optional, default="chroma.jpg"|

###brightness <imageDir>

Adjust the brighness by a value -1 to +1

Example

brightness realcat.jpg -f 0.5 -o brightcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-f | Brightness factor | Optional, default=1| |-o | The name of the new file | Optional, default="chroma.jpg"|

###contrast <imageDir>

Adjust the contrast by a value -1 to +1

Example

contrast realcat.jpg -f 0.5 -o contrastcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-f | Contrast factor | Optional, default=1| |-o | The name of the new file | Optional, default="chroma.jpg"|

###grey <imageDir>

Remove colour from the image

Example

grey realcat.jpg -o greycat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-o | The name of the new file | Optional, default="chroma.jpg"|

###normalize <imageDir>

Normalize the channels in an image

Example

normalize realcat.jpg -o normalcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-o | The name of the new file | Optional, default="chroma.jpg"|

###invert <imageDir>

Normalize the channels in an image

Example

invert realcat.jpg -o invertcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-o | The name of the new file | Optional, default="chroma.jpg"|

###dominant <imageDir>

Displays the dominant colors of an image

Example

dominant abstract.jpg -h

Options

Option|Description| | -----------|----------|---------- |-h | Displays the colors in hex format| |-w | Displays the colors in rgba format|

###fade <imageDir>

Multiply the alpha channel by each pixel by the factor f, 0 - 1

Example

fade realcat.jpg -f 0.5 -o fadecat

Options

Option|Description| | -----------|----------|---------- |-f | Fade factor | Optional, default=1| |-o | The name of the new file | Optional, default="chroma.jpg"|

###sepia <imageDir>

Apply a sepia wash to the image

Example

sepia realcat.jpg -o sepiacat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-o | The name of the new file | Optional, default="chroma.jpg"|

###posterize <imageDir>

Apply a posterization effect with f factor

Example

posterize realcat.jpg -f 5 -o postercat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-f | Posterize factor | Optional, default=1| |-o | The name of the new file | Optional, default="chroma.jpg"|

###rotate <imageDir>

Rotate the image clockwise by a number of degrees.

Example

rotate realcat.jpg -d 30 -o rotatedcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-d | Degrees | Optional, default=90| |-o | The name of the new file | Optional, default="chroma.jpg"|

###flip <imageDir>

Rotate the image clockwise by a number of degrees.

Example

flip realcat.jpg -h -o flippedcat

Cat Cat2

Options

Option|Description| | -----------|----------|---------- |-h | Horizontally | | |-v | Vertically | | |-o | The name of the new file | Optional, default="chroma.jpg"|