Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.26 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.26 KB

stbiscalenx

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
orig orig orig

build

load submodules

submodules:

$ git submodule init
$ git submodule update

install dependencies

build dependencies:

  • build-essential
  • cmake
$ sudo apt-get install build-essential cmake

compilation

$ mkdir build
$ cd build
$ cmake ..
$ make

use

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

structure

  • dependencies.c - API stb
  • scalenx.h - scalen2x and scalen3x.
  • stb/ - stb
  • stbiscalenx.c - CLI program.