OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
Pcx.cpp File Reference
#include "Pcx.h"
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <memory>
#include "Utility/Exception.h"

Classes

struct  PCXHeader
 
struct  bstreamer
 

Typedefs

typedef struct bstreamer bstreamer
 

Enumerations

enum  {
  PCX_VERSION_2_5 = 0 , PCX_VERSION_NOT_VALID = 1 , PCX_VERSION_2_8_WITH_PALLETE = 2 , PCX_VERSION_2_8_WITHOUT_PALLETE = 3 ,
  PCX_VERSION_WINDOWS = 4 , PCX_VERSION_3_0 = 5
}
 

Functions

static void bs_init (bstreamer *bs, const uint8_t *buf, int buf_size)
 
static int bs_get_bytes_left (bstreamer *bs)
 
static unsigned int bs_get_byte (bstreamer *bs)
 
static unsigned int bs_get_buffer (bstreamer *bs, uint8_t *dst, unsigned int size)
 
static int pcx_rle_decode (bstreamer *bs, uint8_t *dst, unsigned int bytes_per_scanline, int compressed)
 
void * writePcxHeader (void *pcx_data, int width, int height)
 
void * encodeOneLine (void *pcx_data, void *line, size_t line_size)
 

Typedef Documentation

◆ bstreamer

typedef struct bstreamer bstreamer

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PCX_VERSION_2_5 
PCX_VERSION_NOT_VALID 
PCX_VERSION_2_8_WITH_PALLETE 
PCX_VERSION_2_8_WITHOUT_PALLETE 
PCX_VERSION_WINDOWS 
PCX_VERSION_3_0 

Function Documentation

◆ bs_get_buffer()

static unsigned int bs_get_buffer ( bstreamer bs,
uint8_t *  dst,
unsigned int  size 
)
inlinestatic

◆ bs_get_byte()

static unsigned int bs_get_byte ( bstreamer bs)
inlinestatic

◆ bs_get_bytes_left()

static int bs_get_bytes_left ( bstreamer bs)
inlinestatic

◆ bs_init()

static void bs_init ( bstreamer bs,
const uint8_t *  buf,
int  buf_size 
)
inlinestatic

◆ encodeOneLine()

void * encodeOneLine ( void *  pcx_data,
void *  line,
size_t  line_size 
)

◆ pcx_rle_decode()

static int pcx_rle_decode ( bstreamer bs,
uint8_t *  dst,
unsigned int  bytes_per_scanline,
int  compressed 
)
static

◆ writePcxHeader()

void * writePcxHeader ( void *  pcx_data,
int  width,
int  height 
)