inline XPM data

This is a discussion on inline XPM data within the C Programming forums, part of the General Programming Boards category; Does anyone know what "inline XPM data" is? I need this for gdk_pixbuf_new_from_xpm_data , which accepts a pointer to a ...

  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    inline XPM data

    Does anyone know what "inline XPM data" is? I need this for gdk_pixbuf_new_from_xpm_data, which accepts a pointer to a const char list (**). Why does this need to be a list? An xpm will work in a normal char buffer just like any other image, right? But if it needs to be passed as a list, how do I structure it?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832
    It looks like XPM is an array of strings (pointers thereof).
    See http://www.algorithmic-solutions.inf.../xpm_data.html

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by nonoob View Post
    It looks like XPM is an array of strings (pointers thereof).
    See http://www.algorithmic-solutions.inf.../xpm_data.html
    Thanks for that one. I was just looking at the array for the binary copy of the xpm:

    Code:
    char on1_xpm[]={47, 42, 32, 88, 80, 77, 32, 42, 47, 10, 115, 116, 97, 116, 105, 99, 32, 99, 104, 97, 114, 32, 42, 32, 119, 9
    7, 
    116, 99, 104, 111, 110, 95, 120, 112, 109, 91, 93, 32, 61, 32, 123, 10, 34, 50, 48, 32, 50, 48, 32, 53, 52, 32, 
    49, 34, 44, 10, 34, 32, 9, 99, 32, 78, 111, 110, 101, 34, 44, 10, 34, 46, 9, 99, 32, 35, 68, 48, 50, 67, 
    49, 48, 34, 44, 10, 34, 43, 9, 99, 32, 35, 67, 66, 50, 49, 48, 67, 34, 44, 10, 34, 64, 9, 99, 32, 35, 
    67, 54, 49, 55,   //etc
    and unlike other image types all the values are characters, so I imagine this shouldn't be too hard to sort out.

    [later]
    lesson: xpm's aren't even binaries, they're text viewable c source
    Last edited by MK27; 10-16-2008 at 08:13 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 02:27 AM
  2. singly linked circular list
    By DarkDot in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2007, 08:55 PM
  3. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. Certain functions
    By Lurker in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2003, 12:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21