Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Macros | Typedefs | Functions | Variables
CImage_loadXPM.cpp File Reference
#include "img-precomp.h"
#include <mrpt/img/CImage.h>
#include <mrpt/core/exceptions.h>
#include <unordered_map>
#include <string>
#include <cstring>
Include dependency graph for CImage_loadXPM.cpp:

Go to the source code of this file.

Classes

struct  XPMColorMapData
 
struct  rgbRecord
 

Macros

#define myRGB(r, g, b)   ((uint32_t)r << 16 | (uint32_t)g << 8 | (uint32_t)b)
 

Typedefs

using XPMColorMap = std::unordered_map< std::string, XPMColorMapData >
 
using Long2LongHash = std::unordered_map< int64_t, int64_t >
 

Functions

static const char * ParseColor (const char *data)
 
static unsigned char ParseHexadecimal (char digit1, char digit2)
 
static bool GetRGBFromName (const char *inname, bool *isNone, unsigned char *r, unsigned char *g, unsigned char *b)
 

Variables

static const rgbRecord theRGBRecords []
 
static const int numTheRGBRecords = 235
 

Macro Definition Documentation

◆ myRGB

#define myRGB (   r,
  g,
  b 
)    ((uint32_t)r << 16 | (uint32_t)g << 8 | (uint32_t)b)

Definition at line 126 of file CImage_loadXPM.cpp.

Typedef Documentation

◆ Long2LongHash

using Long2LongHash = std::unordered_map<int64_t, int64_t>

Definition at line 78 of file CImage_loadXPM.cpp.

◆ XPMColorMap

using XPMColorMap = std::unordered_map<std::string, XPMColorMapData>

Definition at line 77 of file CImage_loadXPM.cpp.

Function Documentation

◆ GetRGBFromName()

static bool GetRGBFromName ( const char *  inname,
bool *  isNone,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b 
)
static

◆ ParseColor()

static const char* ParseColor ( const char *  data)
static

Definition at line 80 of file CImage_loadXPM.cpp.

Referenced by mrpt::img::CImage::loadFromXPM().

◆ ParseHexadecimal()

static unsigned char ParseHexadecimal ( char  digit1,
char  digit2 
)
static

Definition at line 367 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().

Variable Documentation

◆ numTheRGBRecords

const int numTheRGBRecords = 235
static

Definition at line 365 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().

◆ theRGBRecords

const rgbRecord theRGBRecords[]
static

Definition at line 128 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST