node package manager


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.

Image resizing can be done using Jimp or Sharp.


npm install -g resource-scaler


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

Option Description Default
-t, --tool jimp or sharp sharp
-i, --input input folder
-o, --output output folder
-s, --scale scale factor 1
-sa, --sharp_algorithm 1-41
-ja, --jimp_algorithm 1-52
-n, --normalize normalize the channels in the image
-q, --quality quality (0-100, PNG and JPEG only) 100
-v, --verbose verbose
-h, --help help

1Sharp Algorithms

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

2Jimp Algorithms

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


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

Any issues please report.

Licensing Information

MIT license

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