1 <refentry id="gdk-pixbuf-csource">
4 <refentrytitle>gdk-pixbuf-csource</refentrytitle>
5 <manvolnum>1</manvolnum>
9 <refname>gdk-pixbuf-csource</refname>
10 <refpurpose>C code generation utility for GdkPixbuf images</refpurpose>
15 <command>gdk-pixbuf-csource</command>
16 <arg choice="opt">options</arg>
17 <arg choice="opt">image</arg>
20 <command>gdk-pixbuf-csource</command>
21 <arg choice="opt">options</arg>
22 <arg choice="plain">--build-list</arg>
30 <refsect1><title>Description</title>
32 <command>gdk-pixbuf-csource</command> is a small utility that generates C code
33 containing images, useful for compiling images directly into programs.
37 <refsect1><title>Invocation</title>
39 <command>gdk-pixbuf-csource</command> either takes as input one image file name
40 to generate code for, or, using the <option>--build-list</option> option, a
41 list of (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
42 pairs to generate code for a list of images into named variables.
44 <refsect2><title>Options</title>
48 <term><option>--stream</option></term>
50 Generate pixbuf data stream (a single string containing a serialized
51 <structname>GdkPixdata</structname> structure in network byte order).
56 <term><option>--struct</option></term>
58 Generate GdkPixdata structure (needs the <structname>GdkPixdata</structname>
59 structure definition from <filename>gdk-pixdata.h</filename>).
64 <term><option>--macros</option></term>
66 Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and
67 *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.
72 <term><option>--rle</option></term>
74 Enables run-length encoding for the generated pixel data (default).
79 <term><option>--raw</option></term>
81 Disables run-length encoding for the generated pixel data.
86 <term><option>--extern</option></term>
88 Generate extern symbols.
93 <term><option>--static</option></term>
95 Generate static symbols (default).
100 <term><option>--decoder</option></term>
102 Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition
103 to decode run-length encoded image data.
108 <term><option>--name=identifier</option></term>
110 Specifies the identifier name (prefix) for the generated variables or
111 macros (useful only if <option>--build-list</option> was not specified).
116 <term><option>--build-list</option></term>
118 Enables (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
124 <term><option>-h</option>, <option>--help</option></term>
126 Print brief help and exit.
131 <term><option>-v</option>, <option>--version</option></term>
133 Print version and exit.
138 <term><option>--g-fatal-warnings</option></term>
140 Make warnings fatal (causes the program to abort).
148 <refsect1><title>See also</title>
150 The <structname>GdkPixbuf</structname> documentation, shipped with the
151 Gtk+ distribution, available from <ulink url="http://www.gtk.org">www.gtk.org</ulink>.
155 <refsect1><title>Bugs</title>
157 The runlength encoder gets out of sync with the pixel boundaries, since
158 it includes the rowstride padding in the encoded stream. Furthermore, it
159 generates pixbufs with suboptimal rowstride in some cases.
163 <refsect1><title>Author</title>
165 <command>gdk-pixbuf-csource</command> was written by Tim Janik
166 <email>timj@gtk.org</email>.
169 This manual page was provided by Tim Janik <email>timj@gtk.org</email>.