libragephoto Version: 0.1.0
Typedefs | Functions
RagePhotoC.h File Reference
#include "libragephoto_global.h"
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef void * ragephoto_t
 

Functions

LIBRAGEPHOTO_C_EXPORT ragephoto_t ragephoto_open ()
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_clear (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_load (ragephoto_t instance, const char *data, size_t size)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_loadfile (ragephoto_t instance, const char *filename)
 
LIBRAGEPHOTO_C_EXPORT uint8_t ragephoto_error (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_defpbuf_gta5 ()
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_defpbuf_rdr2 ()
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_format_gta5 ()
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_format_rdr2 ()
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotodesc (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_getphotoformat (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotojpeg (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotojson (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotoheader (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_getphotosize (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphototitle (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT size_t ragephoto_getsavesize (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT size_t ragephoto_getsavesizef (ragephoto_t instance, uint32_t photoFormat)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_save (ragephoto_t instance, char *data)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_savef (ragephoto_t instance, char *data, uint32_t photoFormat)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_savefile (ragephoto_t instance, const char *filename)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_savefilef (ragephoto_t instance, const char *filename, uint32_t photoFormat)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setbufferdefault (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setbufferoffsets (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotodesc (ragephoto_t instance, const char *description, uint32_t bufferSize)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotoformat (ragephoto_t instance, uint32_t photoFormat)
 
LIBRAGEPHOTO_C_EXPORT int ragephoto_setphotojpeg (ragephoto_t instance, const char *data, uint32_t size, uint32_t bufferSize)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotojson (ragephoto_t instance, const char *json, uint32_t bufferSize)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotoheader (ragephoto_t instance, const char *header, uint32_t headerSum)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_setphototitle (ragephoto_t instance, const char *title, uint32_t bufferSize)
 
LIBRAGEPHOTO_C_EXPORT void ragephoto_close (ragephoto_t instance)
 
LIBRAGEPHOTO_C_EXPORT const char * ragephoto_version ()
 

Typedef Documentation

◆ ragephoto_t

typedef void* ragephoto_t

RagePhoto C++ class typedef for C API.

Function Documentation

◆ ragephoto_clear()

LIBRAGEPHOTO_C_EXPORT void ragephoto_clear ( ragephoto_t  instance)

Resets the ragephoto_t instance to default values.

Parameters
instanceragephoto_t instance

◆ ragephoto_close()

LIBRAGEPHOTO_C_EXPORT void ragephoto_close ( ragephoto_t  instance)

Closes a ragephoto_t instance.

Parameters
instanceragephoto_t instance

◆ ragephoto_defpbuf_gta5()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_defpbuf_gta5 ( )

Returns the GTA V default Photo Buffer Size.

◆ ragephoto_defpbuf_rdr2()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_defpbuf_rdr2 ( )

Returns the RDR 2 default Photo Buffer Size.

◆ ragephoto_error()

LIBRAGEPHOTO_C_EXPORT uint8_t ragephoto_error ( ragephoto_t  instance)

Returns the last error occurred.

Parameters
instanceragephoto_t instance

◆ ragephoto_format_gta5()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_format_gta5 ( )

Returns the GTA V Photo Format.

◆ ragephoto_format_rdr2()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_format_rdr2 ( )

Returns the RDR 2 Photo Format.

◆ ragephoto_getphotodesc()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotodesc ( ragephoto_t  instance)

Returns the Photo description.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotoformat()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_getphotoformat ( ragephoto_t  instance)

Returns the Photo Format (GTA V or RDR 2).

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotoheader()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotoheader ( ragephoto_t  instance)

Returns the Photo header.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotojpeg()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotojpeg ( ragephoto_t  instance)

Returns the Photo JPEG data.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotojson()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphotojson ( ragephoto_t  instance)

Returns the Photo JSON data.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotosize()

LIBRAGEPHOTO_C_EXPORT uint32_t ragephoto_getphotosize ( ragephoto_t  instance)

Returns the Photo JPEG data size.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphototitle()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_getphototitle ( ragephoto_t  instance)

Returns the Photo title.

Parameters
instanceragephoto_t instance

◆ ragephoto_getsavesize()

LIBRAGEPHOTO_C_EXPORT size_t ragephoto_getsavesize ( ragephoto_t  instance)

Returns the Photo save file size.

Parameters
instanceragephoto_t instance

◆ ragephoto_getsavesizef()

LIBRAGEPHOTO_C_EXPORT size_t ragephoto_getsavesizef ( ragephoto_t  instance,
uint32_t  photoFormat 
)

Returns the Photo save file size.

Parameters
instanceragephoto_t instance
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_load()

LIBRAGEPHOTO_C_EXPORT int ragephoto_load ( ragephoto_t  instance,
const char *  data,
size_t  size 
)

Loads a Photo from a const char*.

Parameters
instanceragephoto_t instance
dataPhoto data
sizePhoto data size

◆ ragephoto_loadfile()

LIBRAGEPHOTO_C_EXPORT int ragephoto_loadfile ( ragephoto_t  instance,
const char *  filename 
)

Loads a Photo from a file.

Parameters
instanceragephoto_t instance
filenameFile to load

◆ ragephoto_open()

LIBRAGEPHOTO_C_EXPORT ragephoto_t ragephoto_open ( )

Opens a ragephoto_t instance.

◆ ragephoto_save()

LIBRAGEPHOTO_C_EXPORT int ragephoto_save ( ragephoto_t  instance,
char *  data 
)

Saves a Photo to a char*.

Parameters
instanceragephoto_t instance
dataPhoto data

◆ ragephoto_savef()

LIBRAGEPHOTO_C_EXPORT int ragephoto_savef ( ragephoto_t  instance,
char *  data,
uint32_t  photoFormat 
)

Saves a Photo to a char*.

Parameters
instanceragephoto_t instance
dataPhoto data
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_savefile()

LIBRAGEPHOTO_C_EXPORT int ragephoto_savefile ( ragephoto_t  instance,
const char *  filename 
)

Saves a Photo to a file.

Parameters
instanceragephoto_t instance
filenameFile to save

◆ ragephoto_savefilef()

LIBRAGEPHOTO_C_EXPORT int ragephoto_savefilef ( ragephoto_t  instance,
const char *  filename,
uint32_t  photoFormat 
)

Saves a Photo to a file.

Parameters
instanceragephoto_t instance
filenameFile to save
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_setbufferdefault()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setbufferdefault ( ragephoto_t  instance)

Sets all cross-format Buffer to default size.

Parameters
instanceragephoto_t instance

◆ ragephoto_setbufferoffsets()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setbufferoffsets ( ragephoto_t  instance)

Moves all Buffer offsets to correct position.

Parameters
instanceragephoto_t instance

◆ ragephoto_setphotodesc()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotodesc ( ragephoto_t  instance,
const char *  description,
uint32_t  bufferSize 
)

Sets the Photo description.

Parameters
instanceragephoto_t instance
descriptionDescription
bufferSizeDescription buffer size

Default bufferSize: 256UL

◆ ragephoto_setphotoformat()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotoformat ( ragephoto_t  instance,
uint32_t  photoFormat 
)

Sets the Photo Format (GTA V or RDR 2).

Parameters
instanceragephoto_t instance
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_setphotoheader()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotoheader ( ragephoto_t  instance,
const char *  header,
uint32_t  headerSum 
)

Sets the Photo header. (EXPERT ONLY)

◆ ragephoto_setphotojpeg()

LIBRAGEPHOTO_C_EXPORT int ragephoto_setphotojpeg ( ragephoto_t  instance,
const char *  data,
uint32_t  size,
uint32_t  bufferSize 
)

Sets the Photo JPEG data.

Parameters
instanceragephoto_t instance
dataJPEG data
sizeJPEG data size
bufferSizeJPEG buffer size

Default bufferSize: ragephoto_defpbuf_gta5() or ragephoto_defpbuf_rdr2()

◆ ragephoto_setphotojson()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setphotojson ( ragephoto_t  instance,
const char *  json,
uint32_t  bufferSize 
)

Sets the Photo JSON data.

Parameters
instanceragephoto_t instance
jsonJSON data
bufferSizeJSON data buffer size

Default bufferSize: 3072UL

◆ ragephoto_setphototitle()

LIBRAGEPHOTO_C_EXPORT void ragephoto_setphototitle ( ragephoto_t  instance,
const char *  title,
uint32_t  bufferSize 
)

Sets the Photo title.

Parameters
instanceragephoto_t instance
titleTitle
bufferSizeTitle buffer size

Default bufferSize: 256UL

◆ ragephoto_version()

LIBRAGEPHOTO_C_EXPORT const char * ragephoto_version ( )

Returns the library version.