gdk-pixbuf-csource.xml 4.61 KB
Newer Older
1 2 3 4 5 6
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gdk-pixbuf-csource">

Matthias Clasen's avatar
Matthias Clasen committed
7 8 9 10 11 12 13 14 15 16 17 18
<refentryinfo>
<title>gdk-pixbuf-csource</title>
<productname>gdk-pixbuf</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Tim</firstname>
<surname>Janik</surname>
</author>
</authorgroup>
</refentryinfo>

19
<refmeta>
20
<refentrytitle>gdk-pixbuf-csource</refentrytitle>
21
<manvolnum>1</manvolnum>
Matthias Clasen's avatar
Matthias Clasen committed
22
<refmiscinfo class="manual">User Commands</refmiscinfo>
23 24 25
</refmeta>

<refnamediv>
26
<refname>gdk-pixbuf-csource</refname>
27 28 29 30 31
<refpurpose>C code generation utility for GdkPixbuf images</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
32
<command>gdk-pixbuf-csource</command>
Matthias Clasen's avatar
Matthias Clasen committed
33 34
<arg choice="opt" rep="repeat">OPTION</arg>
<arg choice="opt">IMAGE</arg>
35 36
</cmdsynopsis>
<cmdsynopsis>
37
<command>gdk-pixbuf-csource</command>
Matthias Clasen's avatar
Matthias Clasen committed
38
<arg choice="opt" rep="repeat">OPTION</arg>
39 40
<arg choice="plain">--build-list</arg>
<arg rep="repeat">
Matthias Clasen's avatar
Matthias Clasen committed
41 42
  <arg>NAME</arg>
  <arg>IMAGE</arg>
43 44 45 46 47 48
</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
49
<command>gdk-pixbuf-csource</command> is a small utility that generates
50 51 52
C code containing images, useful for compiling images directly into programs.
</para>
<para>
53
<command>gdk-pixbuf-csource</command> either takes as input one image file
54 55 56 57
name to generate code for, or, using the <option>--build-list</option> option,
a list of (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
pairs to generate code for a list of images into named variables.
</para>
Matthias Clasen's avatar
Matthias Clasen committed
58 59 60
</refsect1>

<refsect1><title>Options</title>
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
<variablelist>

<varlistentry>
<term><option>--stream</option></term>
<listitem><para>
Generate pixbuf data stream (a single string containing a serialized
<structname>GdkPixdata</structname> structure in network byte order).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--struct</option></term>
<listitem><para>
Generate GdkPixdata structure (needs the <structname>GdkPixdata</structname>
structure definition from <filename>gdk-pixdata.h</filename>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--macros</option></term>
<listitem><para>
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and
*_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--rle</option></term>
<listitem><para>
Enables run-length encoding for the generated pixel data (default).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--raw</option></term>
<listitem><para>
Disables run-length encoding for the generated pixel data.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--extern</option></term>
<listitem><para>
Generate extern symbols.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--static</option></term>
<listitem><para>
Generate static symbols (default).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--decoder</option></term>
<listitem><para>
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition
to decode run-length encoded image data.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--name=identifier</option></term>
<listitem><para>
Specifies the identifier name (prefix) for the generated variables or
macros (useful only if <option>--build-list</option> was not specified).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--build-list</option></term>
<listitem><para>
Enables (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
pair parsing mode.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem><para>
Print brief help and exit.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-v</option>, <option>--version</option></term>
<listitem><para>
Print version and exit.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--g-fatal-warnings</option></term>
<listitem><para>
Make warnings fatal (causes the program to abort).
</para></listitem>
</varlistentry>

</variablelist>
</refsect1>

<refsect1><title>See also</title>
<para>
The <structname>GdkPixbuf</structname> documentation, shipped with the
Gtk+ distribution, available from <ulink url="http://www.gtk.org">www.gtk.org</ulink>.
</para>
</refsect1>

<refsect1><title>Bugs</title>
<para>
The runlength encoder gets out of sync with the pixel boundaries, since
it includes the rowstride padding in the encoded stream. Furthermore, it
generates pixbufs with suboptimal rowstride in some cases.
</para>
</refsect1>
</refentry>