Stb Image Scale Near X. This algorithm is based on the scale2x pixel graphics algorithm. In this algorithm, “equals” is replaced by “near”, which allows it to work with full-color graphics. The algorithm remained simple, like Scale2x. This implementation can enlarge the image by 2 and 3 times.
origin | x2 | x3 |
---|---|---|
submodules:
$ git submodule init
$ git submodule update
build dependencies:
- build-essential
- cmake
$ sudo apt-get install build-essential cmake
$ mkdir build
$ cd build
$ cmake ..
$ make
The first and second parameters specify the paths to the image and the result {PNG}. The -k
option sets the scale factor, valid values are 2 and 3.
./stbiscalenx -k 2 ${IMAGE_PATH} ${IMAGE_PATH}.out.png