2020-08-27 16:38:57 +08:00
# OpenJPEG Sandboxed API
2020-08-12 19:24:30 +08:00
2020-09-17 20:28:19 +08:00
This library provides sandboxed version of the [OpenJPEG ](https://github.com/uclouvain/openjpeg ) library.
2020-08-12 19:24:30 +08:00
2020-08-12 19:37:59 +08:00
## Examples
2020-08-12 19:24:30 +08:00
2020-08-12 19:48:40 +08:00
The examples are sandboxed and simplified version of the main tools provided by the OpenJPEG library, namely (for now) `opj_decompress` from [here ](https://github.com/uclouvain/openjpeg/blob/master/src/bin/jp2/opj_decompress.c ).
2020-08-26 23:13:37 +08:00
2020-09-17 20:28:19 +08:00
In `decompress_example.cc` the library's sandboxed API is used to convert the _.jp2_ to _.pnm_ image format.
2020-08-26 23:13:37 +08:00
## Build
To build this example, after cloning the whole Sandbox API project, you also need to run
```
git submodule update --init --recursive
```
anywhere in the project tree in order to clone the `openjpeg` submodule.
Then in the `sandboxed-api/oss-internship-2020/openjpeg` run
```
mkdir build & & cd build
cmake -G Ninja
ninja
```
To run `decompress_sandboxed` :
```
cd examples
./decompress_sandboxed absolute/path/to/the/file.jp2 absolute/path/to/the/file.pnm
```