dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
encode_images Namespace Reference

Functions

def grouper
 
def encode_image
 
def c_format_image
 

Variables

string img_c_typedef_split
 
tuple img_c_template_split = Template("""static const struct Image image_$name = {\t.width = $width,\t.height = $height,\t.mask = (uint8_t*)mask_$name,\t.level = (uint8_t*)level_$name,};""")
 
string img_c_typedef
 
tuple img_c_template = Template("""static const struct Image image_$name = {\t.width = $width,\t.height = $height,\t.data = (uint8_t*)data_$name,};""")
 
tuple parser = OptionParser()
 
string help = 'Output file'
 
 in_files = args
 
tuple images = dict()
 
list height = image['height']
 

Function Documentation

def encode_images.c_format_image (   fid,
  name,
  image,
  buffers,
  row_width = 16 
)
Format image as a C header

Definition at line 90 of file encode_images.py.

def encode_images.encode_image (   fname)

Definition at line 54 of file encode_images.py.

def encode_images.grouper (   n,
  iterable,
  padvalue = None 
)

Definition at line 50 of file encode_images.py.

Variable Documentation

list encode_images.height = image['height']

Definition at line 127 of file encode_images.py.

string encode_images.help = 'Output file'

Definition at line 110 of file encode_images.py.

tuple encode_images.images = dict()

Definition at line 116 of file encode_images.py.

tuple encode_images.img_c_template = Template("""static const struct Image image_$name = {\t.width = $width,\t.height = $height,\t.data = (uint8_t*)data_$name,};""")

Definition at line 41 of file encode_images.py.

tuple encode_images.img_c_template_split = Template("""static const struct Image image_$name = {\t.width = $width,\t.height = $height,\t.mask = (uint8_t*)mask_$name,\t.level = (uint8_t*)level_$name,};""")

Definition at line 21 of file encode_images.py.

string encode_images.img_c_typedef
Initial value:
1 = """
2 
3 struct Image {
4 \tuint16_t width;
5 \tuint16_t height;
6 \tuint8_t* data;
7 };
8 
9 """

Definition at line 31 of file encode_images.py.

string encode_images.img_c_typedef_split
Initial value:
1 = """
2 
3 struct Image {
4 \tuint16_t width;
5 \tuint16_t height;
6 \tuint8_t* mask;
7 \tuint8_t* level;
8 };
9 
10 """

Definition at line 10 of file encode_images.py.

encode_images.in_files = args

Definition at line 114 of file encode_images.py.

tuple encode_images.parser = OptionParser()

Definition at line 108 of file encode_images.py.