pack-image

1.1.0 • Public • Published

pack-image

pack-image is a very simple packing images tool.

Installation

npm install pack-image -g

Usage

pack-image "**/image*.png" --output packed.png --json packed.json --verbose

example

Filename Image
fish.png fish.png
police_car.png police_car.png
spanner.png spanner.png
squirrel.png squirrel.png
pack-image "**/images/**.png" --output packed.png --json packed.json

packed.png:

packed.png

packed.json:

{
    "squirrel": {
        "width": 64,
        "height": 64,
        "x": 0,
        "y": 0
    },
    "police_car": {
        "width": 48,
        "height": 48,
        "x": 66,
        "y": 0
    },
    "fish": {
        "width": 32,
        "height": 32,
        "x": 66,
        "y": 50
    },
    "spanner": {
        "width": 16,
        "height": 16,
        "x": 0,
        "y": 66
    }
}

Package Sidebar

Install

npm i pack-image

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

11.1 kB

Total Files

9

Last publish

Collaborators

  • yu-ogi