23#include "RagePhotoLibrary.h"
24#include "RagePhotoTypedefs.h"
38 DEFAULT_GTA5_PHOTOBUFFER = 524288UL,
39 DEFAULT_RDR2_PHOTOBUFFER = 1048576UL,
40 DEFAULT_DESCBUFFER = 256UL,
41 DEFAULT_JSONBUFFER = 3072UL,
42 DEFAULT_TITLBUFFER = 256UL,
43 GTA5_HEADERSIZE = 264UL,
44 RDR2_HEADERSIZE = 272UL,
48 DescBufferTight = 39L,
49 DescMallocError = 31L,
51 HeaderBufferTight = 35L,
52 HeaderMallocError = 4L,
53 IncompatibleFormat = 2L,
54 IncompleteChecksum = 7L,
55 IncompleteDescBuffer = 30L,
56 IncompleteDescMarker = 28L,
57 IncompleteDescOffset = 11L,
59 IncompleteHeader = 3L,
60 IncompleteJendMarker = 33L,
61 IncompleteJpegMarker = 12L,
62 IncompleteJsonBuffer = 20L,
63 IncompleteJsonMarker = 18L,
64 IncompleteJsonOffset = 9L,
65 IncompletePhotoBuffer = 14L,
66 IncompletePhotoSize = 15L,
67 IncompleteTitleBuffer = 25L,
68 IncompleteTitleMarker = 23L,
69 IncompleteTitleOffset = 10L,
70 IncorrectDescMarker = 29L,
71 IncorrectJendMarker = 34L,
72 IncorrectJpegMarker = 13L,
73 IncorrectJsonMarker = 19L,
74 IncorrectTitleMarker = 24L,
75 JsonBufferTight = 37L,
76 JsonMallocError = 21L,
79 NoFormatIdentifier = 1L,
80 PhotoBufferTight = 36L,
81 PhotoMallocError = 16L,
83 TitleBufferTight = 38L,
84 TitleMallocError = 26L,
86 UnicodeInitError = 5L,
87 UnicodeHeaderError = 6L,
97 SIGTA5 = 0xE47AB81CUL,
98 SIRDR2 = 0x00FEEB1EUL,
111 bool load(
const char *data,
size_t size);
115 bool load(
const std::string &data);
119 bool loadFile(
const std::string &filename);
120 int32_t error()
const;
121 uint32_t format()
const;
122 const std::string jpeg()
const;
123#if (RAGEPHOTO_CXX_STD >= 17) && (__cplusplus >= 201703L)
124 const std::string_view jpeg_view()
const;
126 const char* jpegData()
const;
127 static uint64_t jpegSign(uint32_t photoFormat,
RagePhotoData *rp_data);
129 uint64_t jpegSign(uint32_t photoFormat)
const;
130 uint64_t jpegSign()
const;
131 uint32_t jpegSize()
const;
132 const char* description()
const;
133 const char* json()
const;
134 const char* header()
const;
135 const char* title()
const;
136 static const char* version();
143 bool save(
char *data, uint32_t photoFormat);
147 bool save(
char *data);
152 const std::string save(uint32_t photoFormat,
bool *ok =
nullptr);
156 const std::string save(
bool *ok =
nullptr);
157 bool saveFile(
const std::string &filename, uint32_t photoFormat);
158 bool saveFile(
const std::string &filename);
161 size_t saveSize(uint32_t photoFormat);
164 void setBufferDefault();
166 void setBufferOffsets();
168 void setDescription(
const char *description, uint32_t bufferSize = 0);
169 void setFormat(uint32_t photoFormat);
175 bool setJpeg(
const char *data, uint32_t size, uint32_t bufferSize = 0);
180 bool setJpeg(
const std::string &data, uint32_t bufferSize = 0);
181 void setJson(
const char *json, uint32_t bufferSize = 0);
182 void setHeader(
const char *header, uint32_t headerSum, uint32_t headerSum2 = 0);
183 void setTitle(
const char *title, uint32_t bufferSize = 0);
GTA V and RDR 2 Photo Parser.
Definition RagePhoto.hpp:34
DefaultSize
Definition RagePhoto.hpp:37
SignInitials
Definition RagePhoto.hpp:96
PhotoFormat
Definition RagePhoto.hpp:91
Error
Definition RagePhoto.hpp:47
Definition RagePhotoTypedefs.h:31