mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
75bbd0e1c1
Only externally visible changes should be a few changed includes as well as some formatting changes. PiperOrigin-RevId: 353226662 Change-Id: Iebf5be13774efcbd94c5d5a17b9b27e47275b229 |
||
---|---|---|
.. | ||
examples | ||
images | ||
tests | ||
wrapper | ||
CMakeLists.txt | ||
README.md | ||
sandboxed.h |
sandboxed LibPNG
Copyright 2020 Google LLC.
Start use
You should make sure the libtiff submodule is cloned.
git clone --recursive https://github.com/google/sandboxed-api
Usage
Build:
mkdir -p build && cd build
cmake .. -DSAPI_ROOT=/path/to/sapi_root
make -j8
Example:
You should add -DLIBPNG_SAPI_ENABLE_EXAMPLES=ON
to use the example.
run PNG to PNG:
./examples/pngtopng /absolute/path/to/input/image.png /absolute/path/to/output/image.png
run RGB to BGR:
./examples/rgbtobgr /absolute/path/to/input/image.png /absolute/path/to/output/image.png
Examples of input and output can be found in images
.
PNG to PNG:
input: images/pngtest.png
output: images/pngtopng_pngtest.png
RGB to BGR:
input: images/red_ball.png
output: images/rgbtobgr_red_ball.png
Tests:
You should add -DLIBPNG_SAPI_ENABLE_TESTS=ON
to use tests and do:
cd tests
ctest .