1XpmCreateBuffer(3)             libXpm functions             XpmCreateBuffer(3)
2
3
4

NAME

6       XpmCreateBuffer  - create an XPM Buffer
7
8

SYNOPSIS

10       int XpmCreateBufferFromImage(Display *display , char **buffer_return,
11              XImage *image, XImage *shapeimage, XpmAttributes *attributes);
12
13       int XpmCreateBufferFromPixmap(Display *display, char **buffer_return,
14              Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes);
15
16       int XpmCreateBufferFromXpmImage(char **buffer_return, XpmImage *image,
17              XpmInfo *info);
18
19

ARGUMENTS

21       display
22              Specifies the connection to the X server.
23
24       buffer_return
25              Returns the buffer which is created.
26
27       image  Specifies the image.
28
29       shapeimage
30              Specifies the shape mask image.
31
32       attributes
33              Specifies the location of a structure containing information (or
34              NULL).
35
36       info   Specifies the location of a structure to get  possible  informa‐
37              tion (or NULL).
38
39

DESCRIPTION

41   XpmCreateBufferFromPixmap
42       XpmCreateBufferFromPixmap()  creates  an XPM buffer from a Pixmap.  The
43       XpmCreateBufferFromPixmap()    function    works    as    XpmWriteFile‐
44       FromPixmap(3),  it  just  calls  XpmCreateBufferFromImage()  instead of
45       XpmWriteFileFromImage(3).  Once again, the caller should free the  buf‐
46       fer using XpmFree(3) when finished.
47
48       As  a  convenience,  the  XpmReadFileToBuffer(3)  and XpmWriteFileFrom‐
49       Buffer(3) functions are provided to copy a file  to  a  buffer  and  to
50       write  a  file  from  a buffer. Thus for instance one may decide to use
51       XpmCreateBufferFromPixmap(), XpmWriteFileFromBuffer(3), and  XpmFree(3)
52       instead of XpmWriteFileFromPixmap(3).  On some systems this may lead to
53       a performance improvement, since the processing will  be  performed  in
54       memory, but it uses more memory.
55
56
57   XpmCreateBufferFromImage
58       The  XpmCreateBufferFromImage()  function  works as XpmWriteFileFromIm‐
59       age(3), it just writes to a malloc’ed buffer instead of to a file.  The
60       caller should free the buffer using XpmFree(3) when finished.
61
62
63   XpmCreateBufferFromXpmImage.
64       To create an XPM buffer from an XpmImage, use XpmCreateBufferFromXpmIm‐
65       age().  The XpmCreateBufferFromXpmImage() function writes out the given
66       image  to  a  single block malloc’ed buffer in XPM format.  If insuffi‐
67       cient working storage is allocated, it returns XpmNoMemory, and returns
68       XpmSuccess  on success.  If the passed XpmInfo structure pointer is not
69       NULL, XpmCreateBufferFromXpmImage() looks for the following attributes:
70       XpmComments,  XpmExtensions, and XpmHotspot, and writes the related in‐
71       formation out as well.  The caller should free the  buffer  using  Xpm‐
72       Free(3) when finished.
73
74

SEE ALSO

76       XpmFree(3), XpmWriteFileFromBuffer(3), XpmWriteFileFromImage(3),
77       XpmWriteFileFromPixmap(3)
78
79
80
81X Version 11                     libXpm 3.5.15              XpmCreateBuffer(3)
Impressum