2.2.0 • Published 6 years ago

resource-scaler v2.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

resource-scaler npm version

A simple node utility to resize images including sprite sheets and spine animations.

Beta Features:

  • Sprite sheet scaling by manipulating the data in JSON files.
  • Spine scaling by manipulating the data in atlas files. JSON data is not manipulated so users need to rely on runtime scaling. More info in the below links. - Spine scaling - Pixi Spine

Image resizing can be done using Jimp or Sharp.

Installation

npm install -g resource-scaler

Usage

resource-scaler -i resources/scale-8 -o resources/scale-4 -s 0.5

OptionDescriptionDefault
-t, --tooljimp or sharpsharp
-i, --inputinput folder
-o, --outputoutput folder
-s, --scalescale factor1
-sa, --sharp_algorithm1-41
-ja, --jimp_algorithm1-52
-n, --normalizenormalize the channels in the image
-q, --qualityquality (0-100, PNG and JPEG only)100
-v, --verboseverbose
-h, --helphelp

1Sharp Algorithms

  • 1 - nearest
  • 2 - cubic
  • 3 - lanczos2
  • 4 - lanczos3

2Jimp Algorithms

  • 1 - bilinear
  • 2 - nearest
  • 3 - bicubic
  • 4 - hermite
  • 5 - bezier

Formats

  • jpg
  • png
  • webp (sharp only)
  • tiff (sharp only)
  • bmp (jimp only)
  • json (texture packer and spine)
  • atlas (spine)

Any issues please report.

Licensing Information

This content is released under the MIT license.

Jimp is licensed under the MIT license.

Sharp is licensed under the Apache License, Version 2.0 (the "License").

Contributor Code of Conduct

Code of Conduct is adapted from Contributor Covenant, version 1.4

2.2.0

6 years ago

2.1.10

6 years ago

2.1.9

6 years ago

2.1.8

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

7 years ago

1.1.4

7 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago