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

NAME

6       XpmCreateImage - create an XImage from an XPM
7

SYNOPSIS

9       int XpmCreateImageFromData(Display *display, char **data,
10              XImage **image_return, XImage **shapeimage_return,
11              XpmAttributes *attributes);
12
13       int XpmCreateImageFromBuffer(Display *display, char *buffer,
14              XImage **image_return, XImage **shapeimage_return,
15              XpmAttributes *attributes);
16
17       int XpmCreateImageFromXpmImage(Display *display,  XpmImage *image,
18              XImage *image_return, XImage *shapeimage_return,
19              XpmAttributes *attributes);
20
21

ARGUMENTS

23       display
24              Specifies the connection to the X server.
25
26       data   Specifies the location of the data.
27
28       image_return
29              Returns the image which is created.
30
31       shapeimage_return
32              Returns  the shape mask image which is created if the color None
33              is used.
34
35       attributes
36              Specifies the location of a structure to get and store  informa‐
37              tion (or NULL).
38
39       shapeimage
40              Specifies the shape mask image which is created if any.
41
42

DESCRIPTION

44   XpmCreateImageFromData
45       To create an XImage from an XPM data, use XpmCreateImageFromData().
46
47       The  XpmCreateImageFromData()  function allows you to include in your C
48       program an XPM  file  which  was  written  out  by  functions  such  as
49       XpmWriteFileFromImage(3)  or  XpmWriteFileFromPixmap(3) without reading
50       in the file.  XpmCreateImageFromData() exactly  works  as  XpmReadFile‐
51       ToImage(3)  does  and returns the same way.  It just reads data instead
52       of a file.  Here again, it is the caller’s responsibility to  free  the
53       returned images, the colors and possibly the data returned into the Xp‐
54       mAttributes structure.
55
56
57   XpmCreateImageFromBuffer
58       To create an XImage from an XPM buffer, use XpmCreateImageFromBuffer().
59       The  XpmCreateImageFromBuffer() function works the same way as XpmRead‐
60       FileToImage(3), it just parses the buffer  instead  of  the  file.   Be
61       aware  that  the  feature  provided on some systems by XpmReadFileToIm‐
62       age(3) to deal with compressed files is not available here.
63
64
65   XpmCreateImageFromXpmImage
66       To create an XImage from an XpmImage, use XpmCreateImageFromXpmImage().
67       From  the given XpmImage and XpmAttributes if not NULL, XpmCreateImage‐
68       FromXpmImage() allocates colors and creates X images following the same
69       mechanism as XpmReadFileToImage(3).  When finished the caller must free
70       the images using XDestroyImage(3), the colors using XFreeColors(3), and
71       possibly  the  data  returned  into  the XpmAttributes using XpmFreeAt‐
72       tributes(3).
73
74

SEE ALSO

76       XpmFreeAttributes(3), XpmReadFileToImage(3)
77
78
79
80X Version 11                     libXpm 3.5.17               XpmCreateImage(3)
Impressum