Logo Search packages:      
Sourcecode: sam2p version File versions

Image::Sampled Class Reference

#include <image.hpp>

Inheritance diagram for Image::Sampled:

SimBuffer::Flat GenBuffer

List of all members.


Detailed Description

Generic, sampled, rectangular image data. Abstract class. Each sample is 1, 2, 4 or 8 bits. Regions: beg..head-1: comment, ignored (e.g unused part of the indexed palette) headp..rowbeg-1: header: not predicted or compressed (e.g the indexed palette) rowbeg+0*rlen..rowbeg+0*rlen+rlen-1: sample data of the 0th row, compressed and predicted rowbeg+1*rlen..rowbeg+1*rlen+rlen-1: sample data of the 1st row rowbeg+2*rlen..rowbeg+2*rlen+rlen-1: sample data of the 1st row ... rowbeg+(h-1)*rlen..rowbeg+h*rlen-1: sample data of the last row trail..beg+len: trailer, ignored. Its length must be >=bpc.

Definition at line 33 of file image.hpp.


Public Types

typedef void(* block_char_t )(char c, void *data)
typedef void(* block_sub_t )(char const *beg, slen_t len, void *data)
typedef unsigned int dimen_t
typedef unsigned long rgb_t
typedef unsigned int rlen_t
typedef unsigned char sample_t

Public Member Functions

virtual SampledaddAlpha (Gray *al)=0
char const * begin_ () const
virtual bool canGray () const =0
int cmp (char const *s2) const
virtual int cmp (GenBuffer const &s2) const
virtual int cmp (char const *s2, slen_t len) const
virtual int cmp (Flat const &s2) const
virtual slen_t copyRange (char *to, slen_t cfrom, slen_t clen) const
virtual void copyRGBRow (char *to, dimen_t whichrow) const =0
void each_char (block_char_t block, void *data) const
virtual void each_sub (block_sub_t block, void *data) const =0
virtual void each_sub (block_sub_t block, void *data) const
char const * end_ () const
slen_t findFirst (char const *s, slen_t slen) const
slen_t findFirst (char const c) const
slen_t findLast (char const c) const
virtual void first_sub (Sub &sub) const
virtual char getAt0 (slen_t idx, char fallback='\0')
unsigned char getBpc () const
unsigned char getCpp () const
unsigned char getCs () const
char const * getCString () const
char * getHeadp () const
dimen_t getHt () const
virtual slen_t getLength () const
rlen_t getRlen () const
char * getRowbeg () const
rgb_t getTranspc () const
unsigned char getTy () const
dimen_t getWd () const
slen_t getXoffs () const
virtual bool hasPixelRGB (Image::Sampled::rgb_t rgb) const
bool hasTransp () const
bool isEmpty () const
virtual unsigned char minRGBBpc () const
virtual void next_sub (Sub &sub) const
virtual operator void * () const
virtual bool operator! () const
char const * operator() () const
char const & operator[] (slendiff_t idx) const
virtual void to8 ()=0
bool toBool (bool &dst)
void toChar (char &ret) const
bool toCString (char *&dst)
virtual Gray * toGray (unsigned char bpc_)=0
virtual Indexed * toIndexed ()=0
bool toInteger (signed int &i)
bool toInteger (unsigned int &i)
bool toInteger (signed short &i)
bool toInteger (unsigned short &i)
bool toInteger (signed long &dst)
bool toInteger (unsigned long &dst)
virtual RGB * toRGB (unsigned char bpc_)=0

Static Public Member Functions

static Indexed * addAlpha0 (Sampled *img, Gray *al)
static char const * cs2devcs (unsigned char cs)
static unsigned hexc2n (char c)
static int nocase_memcmp (char const *a, char const *s, slen_t slen)
static bool nocase_strbegins (char const *a, char const *with)
static int nocase_strcmp (char const *a, char const *b)
static bool parseBool (char const *s, slen_t slen)
static char * rgb2webhash (rgb_t)
static bool strbegins (char const *a, char const *with)
static void tolower_memcpy (char *dst, char const *s, slen_t slen)
static void toupper_memcpy (char *dst, char const *s, slen_t slen)

Public Attributes

 CS_CMYK = 4
 CS_GRAYSCALE = 1
 CS_Indexed_RGB
 CS_RGB = 2
 CS_YCbCr = 3
 CS_YCCK = 5
 TY_BLACKBOX
 TY_GRAY = 2
 TY_INDEXED = 1
 TY_OTHER = 4
 TY_RGB = 3

Protected Member Functions

void init (slen_t l_comment, slen_t l_header, dimen_t wd_, dimen_t ht_, unsigned char bpc_, unsigned char ty_, unsigned char cpp_)
void to8mul ()
void to8nomul ()
Gray * toGray0 (unsigned char bpc_)
Indexed * toIndexed0 ()
RGB * toRGB0 (unsigned char bpc_)

Static Protected Member Functions

static void iter_char_sub (char const *beg, slen_t len, void *data)

Protected Attributes

const char * beg
unsigned char bpc
unsigned char cpp
unsigned char cs
char * headp
dimen_t ht
slen_t len
rlen_t rlen
char * rowbeg
char * trail
rgb_t transpc
unsigned char ty
dimen_t wd
slen_t xoffs

Friends

class B
bool operator!= (const GenBuffer &s1, const char *s2)
bool operator!= (const char *s1, const GenBuffer &s2)
bool operator!= (const GenBuffer &s1, const GenBuffer &s2)
operator+ (const Flat &s1, const char *s2)
operator+ (const char *s1, const Flat &s2)
operator+ (const Flat &s1, const Flat &s2)
bool operator< (const GenBuffer &s1, const char *s2)
bool operator< (const char *s1, const GenBuffer &s2)
bool operator< (const GenBuffer &s1, const GenBuffer &s2)
GenBuffer::Writableoperator<< (GenBuffer::Writable &, Sampled const &)
bool operator<= (const GenBuffer &s1, const char *s2)
bool operator<= (const char *s1, const GenBuffer &s2)
bool operator<= (const GenBuffer &s1, const GenBuffer &s2)
bool operator== (const GenBuffer &s1, const char *s2)
bool operator== (const char *s1, const GenBuffer &s2)
bool operator== (const GenBuffer &s1, const GenBuffer &s2)
bool operator> (const GenBuffer &s1, const char *s2)
bool operator> (const char *s1, const GenBuffer &s2)
bool operator> (const GenBuffer &s1, const GenBuffer &s2)
bool operator>= (const GenBuffer &s1, const char *s2)
bool operator>= (const char *s1, const GenBuffer &s2)
bool operator>= (const GenBuffer &s1, const GenBuffer &s2)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index