Re: xpm in the binary - a newbie question



Quoted by a circus of mutant mosquitos
For `"Janus N." Tøndering <janus bananus dk>' 
On Monday, 21 July 2003 (13:34):


This is just a guess. I believe GIMP is capable of saving pictures to C
code. This might be a possible solution.


        If you open a XPM file in a text editor, you'll notice it's an ordinary C file
-- it's just an array that includes the palette and pixel data, in text. So you
can safely #include them, and use, for example, gdk_pixmap_create_from_xpm_d.

        About glade: if you look in the generated C source, esp. in main.c, you'll see
two lines:

                  add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
                  add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
        
        Guess what they do :)

-- 

 Leandro Pereira              (oO)           <leandro linuxmag com br>
                              /||\                  www.mindcrisis.tk

        "O medo é uma coisa boa. Se você não tiver medo, pode
           acabar pulando pela janela" --Keith Richards  




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]