MeshLib C Docs
Loading...
Searching...
No Matches
MRJpeg.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef struct MR_Image MR_Image
typedef struct MR_expected_MR_Image_std_string MR_expected_MR_Image_std_string

Functions

MRC_API MR_expected_MR_Image_std_stringMR_ImageLoad_fromJpeg_2_std_filesystem_path (const char *path, const char *path_end, const bool *ignoreDecompressErrors)
MRC_API MR_expected_MR_Image_std_stringMR_ImageLoad_fromJpeg_2_std_istream (MR_std_istream *in, const bool *ignoreDecompressErrors)
MRC_API MR_expected_MR_Image_std_stringMR_ImageLoad_fromJpeg_3 (const char *data, MR_uint64_t size, const bool *ignoreDecompressErrors)
MRC_API MR_expected_void_std_stringMR_ImageSave_toJpeg (const MR_Image *image, const char *path, const char *path_end)

Typedef Documentation

◆ MR_expected_MR_Image_std_string

Stores either a MR::Image that represents success or a std::string that represents an error. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_Image

typedef struct MR_Image MR_Image

struct to hold Image data Generated from class MR::Image. Derived classes: Direct: (non-virtual) MR::MeshTexture Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Function Documentation

◆ MR_ImageLoad_fromJpeg_2_std_filesystem_path()

MRC_API MR_expected_MR_Image_std_string * MR_ImageLoad_fromJpeg_2_std_filesystem_path ( const char * path,
const char * path_end,
const bool * ignoreDecompressErrors )

loads from .jpg format

Parameters
ignoreDecompressErrorsif true do not return decompression error if the header was read sucessfully Generated from function MR::ImageLoad::fromJpeg. Parameter path is a UTF-8 encoded filesystem path. Parameter ignoreDecompressErrors has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_Image_std_string_Destroy() to free it when you're done using it.

◆ MR_ImageLoad_fromJpeg_2_std_istream()

MRC_API MR_expected_MR_Image_std_string * MR_ImageLoad_fromJpeg_2_std_istream ( MR_std_istream * in,
const bool * ignoreDecompressErrors )

Generated from function MR::ImageLoad::fromJpeg. Parameter in can not be null. It is a single object. Parameter ignoreDecompressErrors has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_Image_std_string_Destroy() to free it when you're done using it.

◆ MR_ImageLoad_fromJpeg_3()

MRC_API MR_expected_MR_Image_std_string * MR_ImageLoad_fromJpeg_3 ( const char * data,
MR_uint64_t size,
const bool * ignoreDecompressErrors )

Generated from function MR::ImageLoad::fromJpeg. Parameter ignoreDecompressErrors has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_Image_std_string_Destroy() to free it when you're done using it.

◆ MR_ImageSave_toJpeg()

MRC_API MR_expected_void_std_string * MR_ImageSave_toJpeg ( const MR_Image * image,
const char * path,
const char * path_end )

saves in .jpg format Generated from function MR::ImageSave::toJpeg. Parameter image can not be null. It is a single object. Parameter path is a UTF-8 encoded filesystem path. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.