libragephoto/README.md

43 lines
1.2 KiB
Markdown
Raw Normal View History

2021-08-26 00:22:11 +02:00
## libragephoto
2021-09-03 15:21:02 +02:00
Open Source RAGE Photo Parser for GTA V and RDR 2
2021-08-26 00:22:11 +02:00
- Read/Write RAGE Photos error free and correct
2021-08-26 00:22:11 +02:00
- Support for metadata stored in RAGE Photos
- Export RAGE Photos to jpeg with ragephoto-extract
- High Efficient and Simple C++ API
#### Build libragephoto
2021-08-26 00:22:11 +02:00
```bash
git clone https://gitlab.com/Syping/libragephoto && cd libragephoto
mkdir -p build && cd build
cmake ../
make -j $(nproc --all)
sudo make install
```
##### Optional CMake flags
`-DWITH_DOCUMENTATION=ON` `-DWITH_EXTRACT=OFF` `-DWITH_GTK_EXAMPLE=ON` `-DWITH_QT_EXAMPLE=ON` `-DBUILD_SHARED=OFF`
2021-08-26 00:22:11 +02:00
#### How to Use libragephoto
```cpp
RagePhoto ragePhoto;
bool loaded = ragePhoto.load(data, size);
std::string photo = ragePhoto.photo();
2021-08-26 00:22:11 +02:00
const char* photoData = ragePhoto.photoData();
uint32_t photoSize = ragePhoto.photoSize();
std::string json = ragePhoto.json();
std::string title = ragePhoto.title();
RagePhoto::Error error = ragePhoto.error();
uint32_t format = ragePhoto.format(); // RagePhoto::GTA5 or RagePhoto::RDR2
2021-08-26 00:22:11 +02:00
```
[RagePhoto API](https://libragephoto.syping.de/doc/classRagePhoto.html)
2021-08-26 00:22:11 +02:00
#### How to Use ragephoto-extract
```bash
ragephoto-extract PGTA5123456789 photo.jpg
ragephoto-extract PRDR3123456789 photo.jpg
2021-08-26 00:22:11 +02:00
```