Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gdk-pixbuf-csource(1) [centos man page]

GDK-PIXBUF-CSOURCE(1)						   User Commands					     GDK-PIXBUF-CSOURCE(1)

NAME
gdk-pixbuf-csource - C code generation utility for GdkPixbuf images SYNOPSIS
gdk-pixbuf-csource [OPTION...] [IMAGE] gdk-pixbuf-csource [OPTION...] --build-list [[NAME] [IMAGE]...] DESCRIPTION
gdk-pixbuf-csource is a small utility that generates C code containing images, useful for compiling images directly into programs. gdk-pixbuf-csource either takes as input one image file name to generate code for, or, using the --build-list option, a list of (name, image) pairs to generate code for a list of images into named variables. OPTIONS
--stream Generate pixbuf data stream (a single string containing a serialized GdkPixdata structure in network byte order). --struct Generate GdkPixdata structure (needs the GdkPixdata structure definition from gdk-pixdata.h). --macros Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image. --rle Enables run-length encoding for the generated pixel data (default). --raw Disables run-length encoding for the generated pixel data. --extern Generate extern symbols. --static Generate static symbols (default). --decoder Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition to decode run-length encoded image data. --name=identifier Specifies the identifier name (prefix) for the generated variables or macros (useful only if --build-list was not specified). --build-list Enables (name, image) pair parsing mode. -h, --help Print brief help and exit. -v, --version Print version and exit. --g-fatal-warnings Make warnings fatal (causes the program to abort). SEE ALSO
The GdkPixbuf documentation, shipped with the Gtk+ distribution, available from www.gtk.org[1]. BUGS
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. NOTES
1. www.gtk.org http://www.gtk.org gdk-pixbuf GDK-PIXBUF-CSOURCE(1)

Check Out this Related Man Page

gdk-pixbuf-csource(1)						   User Commands					     gdk-pixbuf-csource(1)

NAME
gdk-pixbuf-csource - C code generator for GdkPixbuf images. SYNOPSIS
gdk-pixbuf-csource [--decoder] [---extern] [-h] [--help] [--g-fatal-warnings] [--macros] [--name=identifier] [--raw] [--rle] [--static] [--stream] [--struct] [-v] [--version ] {image} gdk-pixbuf-csource [--decoder] [--extern] [-h] [--help] [--g-fatal-warnings] [--macros] [--raw] [--rle] [--static] [--stream] [--struct] [-v] [--version] [--build-list] {[name image]...} DESCRIPTION
The gdk-pixbuf-csource utility generates C code containing images. You can use gdk-pixbuf-csource to compile images directly into programs. You can use the following types of input with gdk-pixbuf-csource: o A single file, to generate code for the file. o A list of [name image] pairs, using the --build-list option, to generate code for a list of images into named variables. OPTIONS
The following options are supported: --build-list Enable [name image] pair parsing mode. --decoder Provide the following macro definition to decode run-length encoded image data: *_RUN_LENGTH_DECODE image_buf, rle_data, size, bpp --extern Generate extern symbols. This option is only useful with --stream or --struct. The ---extern option causes the structure created to be defined as: const [...] -h, --help Print brief help and exit. --g-fatal-warnings Make warnings fatal. This option causes the program to abort when warnings occur. --macros Generate the following macro definitions for the image: o *_ROWSTRIDE o *_WIDTH o *_HEIGHT o *_BYTES_PER_PIXEL o *_RLE_PIXEL_DATA or *_PIXEL_DATA --name=identifier Specify the identifier name, or prefix, for the generated variables or macros. This option is useful only if you do not specify --build-list. --raw Disable run-length encoding for the generated pixel data. The --raw option dumps out each "(line of data)" in raw image format --rle Enable run-length encoding for the generated pixel data. The --rle option dumps out each line of data in run- length-encoding format. This is a default setting. --static Generate static symbols. This is a default setting. This option is only useful with --stream or --struct. The --static option causes the structure created to be defined as: static const [...] --stream Generate a pixbuf data stream; a single string containing a serialized GdkPixdata structure in network byte order. --struct Generate GdkPixdata structure; needs the GdkPixdata structure definition from gdk-pixdata.h. -v, --version Print version and exit. EXAMPLES
Example 1: To Generate Code From a File example% gdk-pixbuf-csource input_filename Running gdk-pixbuf-csource without any options is the same as specifying the following options: o --stream o --rle o --static Example 2: To Specify a Value for the Structure in the Generated Output example% gdk-pixbuf-csource --name=my_struct --struct input_filename The --name option affects the name of the structure in the generated output when you use either the --stream option or the --struct option. The --name option affects the name of the macro when you use the --macros option. If you use either the --stream option or the --struct option, but you do not specify the --name option, then the default name of the struc- ture in the generated output is my_pixbuf. If you use the --macros option, but you do not specify the --name option, then the default macro names are prefixed with MY_PIXBUF_. Example 3: To Display the Command Output as an Array of Strings example% gdk-pixbuf-csource --name=my_struct --stream input_filename static const guint8 my_struct[] = { "" /* Pixbuf magic (0x47646b50) */ "GdkP" /* length: header (24) + pixel_data (215281) */ " 3I11" /* pixdata_type (0x2010001) */ "21 1" /* rowstride (960) */ " 3300" /* width (320) */ " 1@" /* height (240) */ " 360" /* pixel_data: */ "(line of data)" [...] Example 4: To Display the Output as a GdkPixdata Structure example% gdk-pixbuf-csource --name=my_struct --struct input_filename const GdkPixdata my_struct = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 215281, /* header length + pixel_data length */ 0x2010001, /* pixdata_type */ 960, /* rowstride */ 320, /* width */ 240, /* height */ /* pixel_data: */ "(line of data)" [...] Example 5: To Display the Output as C Macros example% gdk-pixbuf-csource --name=my_struct --macros input_filename #define MY_STRUCT_ROWSTRIDE (960) #define MY_STRUCT_WIDTH (320) #define MY_STRUCT_HEIGHT (240) #define MY_STRUCT_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */ #define MY_STRUCT_RLE_PIXEL_DATA ((guint8*) "(line of data)" [...] EXIT STATUS
The following exit values are returned: 0 Application exited successfully. 1 Application exited with failure, if any file specified on the command line cannot be read. FILES
The following files are used by this application: /usr/bin/gdk-pixbuf-csource The command-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-base-libs-devel | +-----------------------------+-----------------------------+ | | | +-----------------------------+-----------------------------+ |Interface stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
gnome-std-optionslibgdk-x11-2.0(3) libgdk_pixbuf-2.0(3) NOTES
Updated by Brian Cameron, Sun Microsystems Inc., April 2003. Written by Tim Janik timj@gtk.org SunOS 5.10 02 April 2003 gdk-pixbuf-csource(1)
Man Page