1
2DIRECTFB-CSOURCE(1)          DirectFB Manual Pages         DIRECTFB-CSOURCE(1)
3
4
5

NAME

7       directfb-csource - C code generation utility for DirectFB surfaces
8
9

SYNOPSIS

11       directfb-csource [options] <imagefiles>
12
13

DESCRIPTION

15       directfb-csource  is  a  small utility that reads PNG (Portable Network
16       Graphics) image files and generates C code that can be used to  compile
17       an  image  into  a  DirectFB application.  Below is a simple example to
18       illustrate this.
19
20       If multiple PNG image files are passed to  directfb-csource,  they  are
21       combined  into a single surface. The different images can then be blit‐
22       ted from this surface using  the  array  of  rectangles  that  is  also
23       dumped. This can be useful for example for icons or sprites.
24
25
26

OPTIONS

28       --name=identifier
29              Specifies  the  identifier name (prefix) for the generated vari‐
30              ables.  If this option is not used, the identifier is  generated
31              from  the  filename.  You have to specify an identifer name when
32              processing multiple images.
33
34
35       --format=pixelformat
36              Specifies the pixel-format of the generated inline surface. Pos‐
37              sible  values  are  ARGB, RGB32, RGB24, RGB16, RGB15, RGB332, A8
38              and LUT8.  By default the format is ARGB if the PNG image has an
39              alpha channel or RGB32 otherwise.
40
41
42       --dither-rgb16
43              If  specified,  images  rendered to RGB16 surfaces are dithered.
44              This reduces banding caused  by  the  limited  colorspace.  This
45              option has no effect for other pixel-formats than RGB16.
46
47
48       --transparent=AARRGGBB
49              If  specified,  completely  transparent  pixels  are set to this
50              color value.  This may be useful for color keying  and  to  work
51              around bugs in graphics driver.
52
53
54       --version
55              Output version information.
56
57
58       --help Print brief help and exit.
59
60
61

EXAMPLE

63       Generate a header file from a PNG image file:
64
65            directfb-csource --name=foo foo.png > foo.h
66
67       Include  the  generated header in your application and create a surface
68       using the surface description from the header file:
69
70         #include <directfb.h>
71         #include "foo.h"
72
73         IDirectFB        *dfb;
74         IDirectFBSurface *surface;
75
76         ...
77
78         dfb->CreateSurface( dfb, &foo_desc, &surface );
79
80
81

OTHER INFO

83       directfb-csource was inspired by and uses code from gdk-pixbuf-csource,
84       a similar program written by Tim Janik.
85
86       The   canonical  place  to  find  informations  about  DirectFB  is  at
87       http://www.directfb.org/.
88
89
90
91Version 1.4.11                    14 May 2009              DIRECTFB-CSOURCE(1)
Impressum