Re: XForms: flimage problem

From: spl@ncmir.ucsd.edu
Date: Wed Mar 06 2002 - 16:59:21 EST


# To subscribers of the xforms list from spl@ncmir.ucsd.edu :

> I am trying to dump a pixmap to a file. I found the flimage stuff and
> it looks (more or less) exactly like what I need. Unfortunately, I am
> obviously too stupid to understand the manual. ...

What you are doing appears to be correct and in a test I confirmed
that the functions work as advertised.

It is possible that the core dump is being caused by some memory
problem elsewhere in your code or that you're feeding flimage_getmem()
improper dimensions.

You can check the dimensions of a pixmap using XGetGeometry():

    [...]
    Pixmap pixmap;
    Window root;
    int x;
    int y;
    unsigned int width;
    unsigned int height;
    unsigned int border_width;
    unsigned int depth;

    [...]

    XGetGeometry( fl_get_display(), pixmap, &root,
                  &x, &y, &width, &height, &border_width, &depth );

and then use those values to set your flimage dimensions.

                                                        spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/



This archive was generated by hypermail 2b29 : Wed May 01 2002 - 13:54:15 EDT