'\" te .TH gdk-pixbuf-csource 1 "02 April 2003" "SunOS 5.11" "User Commands" .SH "NAME" gdk-pixbuf-csource \- C code generator for GdkPixbuf images\&. .SH "SYNOPSIS" .PP \fBgdk-pixbuf-csource\fR [-\fB-decoder\fR] [-\fB-extern\fR] [-\fB-help\fR] [-\fB-g-fatal-warnings\fR] [-\fB-macros\fR] [-\fB-name=\fIidentifier\fR\fR] [-\fB-raw\fR] [-\fB-rle\fR] [-\fB-static\fR] [-\fB-stream\fR] [-\fB-struct\fR] [-\fB-version\fR] {\fIimage\fR} .PP \fBgdk-pixbuf-csource\fR [-\fB-decoder\fR] [-\fB-extern\fR] [-\fB-help\fR] [-\fB-g-fatal-warnings\fR] [-\fB-macros\fR] [-\fB-raw\fR] [-\fB-rle\fR] [-\fB-static\fR] [-\fB-stream\fR] [-\fB-struct\fR] [-\fB-version\fR] [-\fB-build-list\fR] {[\fIname image\fR]\&.\&.\&.} .SH "DESCRIPTION" .PP The \fBgdk-pixbuf-csource\fR utility generates C code containing images\&. You can use \fBgdk-pixbuf-csource\fR to compile images directly into programs\&. .PP You can use the following types of input with \fBgdk-pixbuf-csource:\fR .sp .in +2 \(bu .mk .in +3 .rt A single file, to generate code for the file\&. .in -3 \(bu .mk .in +3 .rt A list of [\fIname\fR\fIimage\fR] pairs, using the -\fB-build-list\fRoption, to generate code for a list of images into named variables\&. .in -3 .in -2 .SH "OPTIONS" .PP The following options are supported: .sp .ne 2 .mk \fB-\fB-build-list\fR\fR .in +24n .rt Enable [\fIname\fR \fIimage\fR] pair parsing mode\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-decoder\fR\fR .in +24n .rt Provide the following macro definition to decode run-length encoded image data: .sp .sp .in +2 .mk .in +3 .rt *_RUN_LENGTH_DECODE image_buf, rle_data, size, bpp .in -3 .in -2 .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-extern\fR\fR .in +24n .rt Generate extern symbols\&. This option is only useful with -\fB-stream\fR or -\fB-struct\fR\&. The -\fB--extern\fR option causes the structure created to be defined as: \fBconst [\&.\&.\&.]\fR .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fBh\fR, -\fB--help\fR\fR .in +24n .rt Print brief help and exit\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-g-fatal-warnings\fR\fR .in +24n .rt Make warnings fatal\&. This option causes the program to abort when warnings occur\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-macros\fR\fR .in +24n .rt Generate the following macro definitions for the image: .sp .sp .in +2 \(bu .mk .in +3 .rt *_ROWSTRIDE .in -3 \(bu .mk .in +3 .rt *_WIDTH .in -3 \(bu .mk .in +3 .rt *_HEIGHT .in -3 \(bu .mk .in +3 .rt *_BYTES_PER_PIXEL .in -3 \(bu .mk .in +3 .rt *_RLE_PIXEL_DATA or *_PIXEL_DATA .in -3 .in -2 .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-name=\fIidentifier\fR\fR\fR .in +24n .rt Specify the identifier name, or prefix, for the generated variables or macros\&. This option is useful only if you do not specify -\fB-build-list\fR\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-raw\fR\fR .in +24n .rt Disable run-length encoding for the generated pixel data\&. The -\fB-raw\fR option dumps out each "(line of data)" in raw image format .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-rle\fR\fR .in +24n .rt Enable run-length encoding for the generated pixel data\&. The -\fB-rle\fR option dumps out each line of data in run-length-encoding format\&. This is a default setting\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-static\fR\fR .in +24n .rt Generate static symbols\&. This is a default setting\&. This option is only useful with -\fB-stream\fR or -\fB-struct\fR\&. The -\fB-static\fR option causes the structure created to be defined as: \fBstatic const [\&.\&.\&.]\fR .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-stream\fR\fR .in +24n .rt Generate a pixbuf data stream; a single string containing a serialized GdkPixdata structure in network byte order\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fB-struct\fR\fR .in +24n .rt Generate GdkPixdata structure; needs the GdkPixdata structure definition from gdk-pixdata\&.h\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fBv\fR, -\fB-version\fR\fR .in +24n .rt Print version and exit\&. .sp .sp 1 .in -24n .SH "EXAMPLES" .PP \fBExample 1: To Generate Code From a File\fR .PP .PP .nf example% \fBgdk-pixbuf-csource \fIinput_filename\fR\fR .fi .PP Running \fBgdk-pixbuf-csource\fR without any options is the same as specifying the following options: .sp .in +2 \(bu .mk .in +3 .rt -\fB-stream\fR .in -3 \(bu .mk .in +3 .rt -\fB-rle\fR .in -3 \(bu .mk .in +3 .rt -\fB-static\fR .in -3 .in -2 .PP \fBExample 2: To Specify a Value for the Structure in the Generated Output\fR .PP .PP .nf example% \fBgdk-pixbuf-csource --name=my_struct --struct \fIinput_filename\fR\fR .fi .PP The -\fB-name\fR option affects the name of the structure in the generated output when you use either the -\fB-stream\fR option or the -\fB-struct\fR option\&. The -\fB-name\fR option affects the name of the macro when you use the -\fB-macros\fR option\&. .PP If you use either the -\fB-stream\fR option or the -\fB-struct\fR option, but you do not specify the -\fB-name\fR option, then the default name of the structure in the generated output is \fBmy_pixbuf\fR\&. .PP If you use the -\fB-macros\fR option, but you do not specify the -\fB-name\fR option, then the default macro names are prefixed with \fBMY_PIXBUF_\fR\&. .PP \fBExample 3: To Display the Command Output as an Array of Strings\fR .PP .PP .nf example% \fBgdk-pixbuf-csource --name=my_struct --stream \fIinput_filename\fR\fR .fi .PP .nf static const guint8 my_struct[] = { "" /* Pixbuf magic (0x47646b50) */ "GdkP" /* length: header (24) + pixel_data (215281) */ "\0\3I\11" /* pixdata_type (0x2010001) */ "\2\1\0\1" /* rowstride (960) */ "\0\0\3\300" /* width (320) */ "\0\0\1@" /* height (240) */ "\0\0\0\360" /* pixel_data: */ "(line of data)" [\&.\&.\&.] .fi .PP \fBExample 4: To Display the Output as a GdkPixdata Structure\fR .PP .PP .nf example% \fBgdk-pixbuf-csource --name=my_struct --struct \fIinput_filename\fR\fR .fi .PP .nf 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)" [\&.\&.\&.] .fi .PP \fBExample 5: To Display the Output as C Macros\fR .PP .PP .nf example% \fBgdk-pixbuf-csource --name=my_struct --macros \fIinput_filename\fR\fR .fi .PP .nf #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)" \ [\&.\&.\&.] .fi .SH "EXIT STATUS" .PP The following exit values are returned: .sp .ne 2 .mk \fB\fB0\fR\fR .in +9n .rt Application exited successfully\&. .sp .sp 1 .in -9n .sp .ne 2 .mk \fB\fB1\fR\fR .in +9n .rt Application exited with failure, if any file specified on the command line cannot be read\&. .sp .sp 1 .in -9n .SH "FILES" .PP The following files are used by this application: .sp .ne 2 .mk \fB\fB/usr/bin/gdk-pixbuf-csource\fR\fR .sp .6 .in +4 The command-line executable for the application\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fB/usr/share/gtk-doc/html/gdk-pixbuf\fR\fR .sp .6 .in +4 Location of developer documentation .sp .sp 1 .in -4 .SH "ATTRIBUTES" .PP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS tab() allbox; cw(2.750000i)| cw(2.750000i) lw(2.750000i)| lw(2.750000i). ATTRIBUTE TYPEATTRIBUTE VALUE AvailabilitySUNWgtk2-devel Interface stabilityCommitted .TE .sp .SH "SEE ALSO" .PP \fBgdk-pixbuf-query-loaders\fR(1), \fBglib-genmarshal\fR(1), \fBglib-gettextize\fR(1), \fBglib-mkenums\fR(1), \fBgobject-query\fR(1), \fBgtk-query-immodules-2\&.0\fR(1), \fBgtk-update-icon-cache\fR(1), \fBlibgdk_pixbuf-2\&.0\fR(3), \fBattributes\fR(5), \fBgnome-interfaces\fR(5) .PP .SH "NOTES" .PP Updated by Brian Cameron, Sun Microsystems Inc\&., April 2003, 2006\&. .PP Written by Tim Janik timj@gtk\&.org ...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30