1*ec63e07aSXin Li# sandboxed LibPNG 2*ec63e07aSXin LiCopyright 2020 Google LLC. 3*ec63e07aSXin Li 4*ec63e07aSXin Li## Start use 5*ec63e07aSXin LiYou should make sure the libtiff submodule is cloned. 6*ec63e07aSXin Li 7*ec63e07aSXin Li`git clone --recursive https://github.com/google/sandboxed-api` 8*ec63e07aSXin Li 9*ec63e07aSXin Li## Usage 10*ec63e07aSXin Li 11*ec63e07aSXin Li#### Build: 12*ec63e07aSXin Li``` 13*ec63e07aSXin Limkdir -p build && cd build 14*ec63e07aSXin Licmake .. -DSAPI_ROOT=/path/to/sapi_root 15*ec63e07aSXin Limake -j8 16*ec63e07aSXin Li``` 17*ec63e07aSXin Li 18*ec63e07aSXin Li#### Example: 19*ec63e07aSXin LiYou should add `-DLIBPNG_SAPI_BUILD_EXAMPLES=ON` to use the example.\ 20*ec63e07aSXin Lirun PNG to PNG: 21*ec63e07aSXin Li``` 22*ec63e07aSXin Li./examples/pngtopng /absolute/path/to/input/image.png /absolute/path/to/output/image.png 23*ec63e07aSXin Li``` 24*ec63e07aSXin Lirun RGB to BGR: 25*ec63e07aSXin Li``` 26*ec63e07aSXin Li./examples/rgbtobgr /absolute/path/to/input/image.png /absolute/path/to/output/image.png 27*ec63e07aSXin Li``` 28*ec63e07aSXin Li 29*ec63e07aSXin LiExamples of input and output can be found in `images`. 30*ec63e07aSXin Li 31*ec63e07aSXin LiPNG to PNG: \ 32*ec63e07aSXin Liinput: `images/pngtest.png`\ 33*ec63e07aSXin Lioutput:` images/pngtopng_pngtest.png` 34*ec63e07aSXin Li 35*ec63e07aSXin LiRGB to BGR: \ 36*ec63e07aSXin Liinput: `images/red_ball.png`\ 37*ec63e07aSXin Lioutput: `images/rgbtobgr_red_ball.png` 38*ec63e07aSXin Li 39*ec63e07aSXin Li 40*ec63e07aSXin Li#### Tests: 41*ec63e07aSXin LiYou should add `-DLIBPNG_SAPI_BUILD_TESTING=ON` to use tests and do: 42*ec63e07aSXin Li``` 43*ec63e07aSXin Licd tests 44*ec63e07aSXin Lictest . 45*ec63e07aSXin Li``` 46