Re: Problem using gdk-pixbuf
- From: James Henstridge <james daa com au>
- To: Loban Rahman <loban enigma caltech edu>
- Cc: gnome-devel-list gnome org
- Subject: Re: Problem using gdk-pixbuf
- Date: Fri, 21 Apr 2000 15:12:10 +0800 (WST)
You haven't called gtk_init (or gdk_init or gnome_init). The most
reliable way to decode the colours in a XPM file is to ask the X server to
do it, which is impossible if you haven't initialised the connection.
it should be:
int
main(int argc, char **argv) {
gtk_init(&argc, &argv);
> GdkPixbuf *pacman = gdk_pixbuf_new_from_xpm_data(pacman_xpm);
> }
> ------------------------------------------------------------------
>
> The pacman_xpm was generated by The Gimp. When I run this, it segfaults.
> Here is the backtrace.
>
> What's wrong?
>
> = L
>
James.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]