Re: Inbedding Image Data ?
- From: Jonathan Blandford <jrb redhat com>
- To: Shaun McCance <shaunm wolfram com>
- Cc: pgmoscatt optushome com au, GTK App Dev List <gtk-app-devel-list gnome org>
- Subject: Re: Inbedding Image Data ?
- Date: 16 May 2003 16:16:07 -0400
Shaun McCance <shaunm wolfram com> writes:
On Wed, 2003-05-14 at 17:51, Peter Moscatt wrote:
I am creating an app using Gnome/Gtk/Anjuta. This app has a toolbar
with a number of buttons with custom images.
The image is called within the code. If the XPM file dosen't exist in
the correct location then the image isn't displayed in the button.
Is there a way I can convert the image into data which then I can inbed
into my code ?
XPM is a text format, suitable for inclusion in C. Open any XPM file in
your text editor of choice and you'll see the format. You can write
this data directly into your source code, and then create the pixmap
with gdk_pixmap_create_from_xpm_d. See
http://developer.gnome.org/doc/API/2.0/gdk
Rather than use that, you prolly want to use 'gdk-pixbuf-csource' which
can create raw data that you can load with gdk-pixbuf. More info at:
http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-creating.html
Also, gdk-pixbuf-csource has a man page.
Good luck,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]