add custom load functions, move private data to struct

This commit is contained in:
Syping 2021-10-28 03:28:36 +02:00
parent 1d48cd0fbd
commit 136520372d
6 changed files with 313 additions and 267 deletions

View file

@ -1,7 +1,7 @@
## libragephoto
Open Source RAGE Photo Parser for GTA V and RDR 2
- Read RAGE Photos error free and correct
- Read/Write RAGE Photos error free and correct
- Support for metadata stored in RAGE Photos
- Export RAGE Photos to jpeg with ragephoto-extract
- High Efficient and Simple C++ API
@ -24,12 +24,13 @@ sudo make install
```cpp
RagePhoto ragePhoto;
bool loaded = ragePhoto.load(data, size);
std::string photo = ragePhoto.photo();
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();
RagePhoto::PhotoFormat format = ragePhoto.format();
uint32_t format = ragePhoto.format(); // RagePhoto::GTA5 or RagePhoto::RDR2
```
[RagePhoto API](https://libragephoto.syping.de/doc/classRagePhoto.html)