libragephoto Version: 0.6.0
|
GTA V and RDR 2 Photo Parser. More...
#include <RagePhoto>
Public Member Functions | |
void | addParser (RagePhotoFormatParser *rp_parser) |
void | clear () |
RagePhotoData * | data () |
bool | load (const char *data, size_t size) |
bool | load (const std::string &data) |
bool | loadFile (const std::string &filename) |
int32_t | error () const |
uint32_t | format () const |
const std::string | jpeg () const |
const std::string_view | jpeg_view () const |
const char * | jpegData () const |
uint64_t | jpegSign (uint32_t photoFormat) const |
uint64_t | jpegSign () const |
uint32_t | jpegSize () const |
const char * | description () const |
const char * | header () const |
const char * | json () const |
const char * | title () const |
bool | save (char *data, uint32_t photoFormat) |
bool | save (char *data) |
const std::string | save (uint32_t photoFormat, bool *ok=nullptr) |
const std::string | save (bool *ok=nullptr) |
bool | saveFile (const char *filename, uint32_t photoFormat) |
bool | saveFile (const char *filename) |
size_t | saveSize (uint32_t photoFormat) |
size_t | saveSize () |
void | setBufferDefault () |
void | setBufferOffsets () |
bool | setData (RagePhotoData *rp_data, bool takeCopy=true) |
void | setDescription (const char *description, uint32_t bufferSize=0) |
void | setFormat (uint32_t photoFormat) |
void | setHeader (const char *header, uint32_t headerSum, uint32_t headerSum2=0) |
bool | setJpeg (const char *data, uint32_t size, uint32_t bufferSize=0) |
bool | setJpeg (const std::string &data, uint32_t bufferSize=0) |
void | setJson (const char *json, uint32_t bufferSize=0) |
void | setTitle (const char *title, uint32_t bufferSize=0) |
Static Public Member Functions | |
static void | clear (RagePhotoData *rp_data) |
static bool | load (const char *data, size_t size, RagePhotoData *rp_data, RagePhotoFormatParser *rp_parser) |
static uint64_t | jpegSign (uint32_t photoFormat, RagePhotoData *rp_data) |
static uint64_t | jpegSign (RagePhotoData *rp_data) |
static const char * | version () |
static bool | save (char *data, uint32_t photoFormat, RagePhotoData *rp_data, RagePhotoFormatParser *rp_parser) |
static bool | save (char *data, RagePhotoData *rp_data, RagePhotoFormatParser *rp_parser) |
static size_t | saveSize (uint32_t photoFormat, RagePhotoData *rp_data, RagePhotoFormatParser *rp_parser) |
static size_t | saveSize (RagePhotoData *rp_data, RagePhotoFormatParser *rp_parser) |
static void | setBufferDefault (RagePhotoData *rp_data) |
static void | setBufferOffsets (RagePhotoData *rp_data) |
static void | setLibraryFlag (RagePhotoLibraryFlag flag, bool state=true) |
GTA V and RDR 2 Photo Parser.
enum ragephoto::photo::DefaultSize : uint32_t |
Default sizes
enum ragephoto::photo::Error : int32_t |
Parsing and set errors
enum ragephoto::photo::PhotoFormat : uint32_t |
enum ragephoto::photo::SignInitials : uint32_t |
void RagePhoto::addParser | ( | RagePhotoFormatParser * | rp_parser | ) |
Add a custom defined RagePhotoFormatParser.
void RagePhoto::clear | ( | ) |
Resets the RagePhotoData object to default values.
|
static |
Resets the RagePhotoData object to default values.
RagePhotoData * RagePhoto::data | ( | ) |
Returns the internal RagePhotoData object.
const char * RagePhoto::description | ( | ) | const |
Returns the Photo description.
int32_t RagePhoto::error | ( | ) | const |
Returns the last error occurred.
uint32_t RagePhoto::format | ( | ) | const |
Returns the Photo Format (GTA V or RDR 2).
const char * RagePhoto::header | ( | ) | const |
Returns the Photo header.
const std::string RagePhoto::jpeg | ( | ) | const |
Returns the Photo JPEG data.
const std::string_view RagePhoto::jpeg_view | ( | ) | const |
Returns the Photo JPEG data.
const char * RagePhoto::jpegData | ( | ) | const |
Returns the Photo JPEG data.
uint64_t RagePhoto::jpegSign | ( | ) | const |
Returns the Photo JPEG sign.
|
static |
Returns the Photo JPEG sign.
uint64_t RagePhoto::jpegSign | ( | uint32_t | photoFormat | ) | const |
Returns the Photo JPEG sign.
|
static |
Returns the Photo JPEG sign.
uint32_t RagePhoto::jpegSize | ( | ) | const |
Returns the Photo JPEG data size.
const char * RagePhoto::json | ( | ) | const |
Returns the Photo JSON data.
bool RagePhoto::load | ( | const char * | data, |
size_t | size ) |
Loads a Photo from a const char*.
data | Photo data |
size | Photo data size |
|
static |
Loads a Photo from a const char*.
bool RagePhoto::load | ( | const std::string & | data | ) |
Loads a Photo from a std::string.
data | Photo data |
bool RagePhoto::loadFile | ( | const std::string & | filename | ) |
Loads a Photo from a file.
filename | File to load |
const std::string RagePhoto::save | ( | bool * | ok = nullptr | ) |
Saves a Photo to a std::string.
ok | true when saved successfully |
bool RagePhoto::save | ( | char * | data | ) |
Saves a Photo to a char*.
data | Photo data |
|
static |
Saves a Photo to a char*.
bool RagePhoto::save | ( | char * | data, |
uint32_t | photoFormat ) |
Saves a Photo to a char*.
data | Photo data |
photoFormat | Photo Format (GTA V or RDR 2) |
|
static |
Saves a Photo to a char*.
const std::string RagePhoto::save | ( | uint32_t | photoFormat, |
bool * | ok = nullptr ) |
Saves a Photo to a std::string.
photoFormat | Photo Format (GTA V or RDR 2) |
ok | true when saved successfully |
bool RagePhoto::saveFile | ( | const char * | filename | ) |
Saves a Photo to a file.
bool RagePhoto::saveFile | ( | const char * | filename, |
uint32_t | photoFormat ) |
Saves a Photo to a file.
size_t RagePhoto::saveSize | ( | ) |
Returns the Photo save file size.
|
static |
Returns the Photo save file size.
size_t RagePhoto::saveSize | ( | uint32_t | photoFormat | ) |
Returns the Photo save file size.
|
static |
Returns the Photo save file size.
void RagePhoto::setBufferDefault | ( | ) |
Sets all cross-format Buffer to default size.
|
static |
Sets all cross-format Buffer to default size.
void RagePhoto::setBufferOffsets | ( | ) |
Moves all Buffer offsets to correct position.
|
static |
Moves all Buffer offsets to correct position.
bool RagePhoto::setData | ( | RagePhotoData * | rp_data, |
bool | takeCopy = true ) |
Sets the internal RagePhotoData object.
void RagePhoto::setDescription | ( | const char * | description, |
uint32_t | bufferSize = 0 ) |
Sets the Photo description.
void RagePhoto::setFormat | ( | uint32_t | photoFormat | ) |
Sets the Photo Format (GTA V or RDR 2).
void RagePhoto::setHeader | ( | const char * | header, |
uint32_t | headerSum, | ||
uint32_t | headerSum2 = 0 ) |
Sets the Photo header.
bool RagePhoto::setJpeg | ( | const char * | data, |
uint32_t | size, | ||
uint32_t | bufferSize = 0 ) |
Sets the Photo JPEG data.
data | JPEG data |
size | JPEG data size |
bufferSize | JPEG buffer size |
bool RagePhoto::setJpeg | ( | const std::string & | data, |
uint32_t | bufferSize = 0 ) |
Sets the Photo JPEG data.
data | JPEG data |
bufferSize | JPEG buffer size |
void RagePhoto::setJson | ( | const char * | json, |
uint32_t | bufferSize = 0 ) |
Sets the Photo JSON data.
|
static |
Sets a library flag.
void RagePhoto::setTitle | ( | const char * | title, |
uint32_t | bufferSize = 0 ) |
Sets the Photo title.
const char * RagePhoto::title | ( | ) | const |
Returns the Photo title.
|
static |
Returns the library version.