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       --version
43              Output version information.
44
45
46       --help Print brief help and exit.
47
48
49

EXAMPLE

51       Generate a header file from a PNG image file:
52
53            directfb-csource --name=foo foo.png > foo.h
54
55       Include  the  generated header in your application and create a surface
56       using the surface description from the header file:
57
58         #include <directfb.h>
59         #include "foo.h"
60
61         IDirectFB        *dfb;
62         IDirectFBSurface *surface;
63
64         ...
65
66         dfb->CreateSurface( dfb, &foo_desc, &surface );
67
68
69

OTHER INFO

71       directfb-csource was inspired by and uses code from gdk-pixbuf-csource,
72       a similar program written by Tim Janik.
73
74       The   canonical  place  to  find  informations  about  DirectFB  is  at
75       http://www.directfb.org/.
76
77
78
79Version 1.0.0                     24 Oct 2003              DIRECTFB-CSOURCE(1)
Impressum