Utility for resize images, based on stb_image lib. Developed for work on satellite's Raspberry Pi
$ git clone git@github.com:zdrvzbl/stb-resize.git
Build dependencies:
$ sudo apt install build-essential cmake
Cross-compiling toolchain if you need: https://github.com/zdrvzbl/rpi-crosscompile-template#setup
$ cmake --preset <linux-default | linux-arm> .
$ cmake --build <build/default | build/rpi>
$ cmake --install <build/default | build/rpi>
CMake install command copies binary and script to ~/bin
or {projectDir}/rpi-install/bin
in depend of chosen preset
The first and second parameters specify the paths to the image and the result. The -H
, -W
and -r
options set the resulting dimensions. If -H
and -W
is given, then -r
is ignored. -q
option sets quality of output image in percents
stb-resize -r 4 -q 90 image_in.jpg image_out.jpg
stb_{name}
- stb_image headersmain.c
- CLI programscripts/preview.sh
- Script for making photo previews on satellite's RPi