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

NAME

6       XpmCreateData - create an Data structure
7
8

SYNOPSIS

10       int XpmCreateDataFromImage(Display *display, char ***data_return,
11              XImage *image, XImage *shapeimage, XpmAttributes *attributes);
12
13       int XpmCreateDataFromPixmap(Display *display, char ***data_return,
14              Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes);
15
16       int XpmCreateDataFromXpmImage(char ***data_return, XpmImage *image,
17              XpmInfo *info);
18
19

ARGUMENTS

21       display
22              Specifies the connection to the X server.
23
24       data_return
25              Returns the data which is created.
26
27       pixmap Specifies the pixmap.
28
29       shapemask
30              Specifies the shape mask pixmap.
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 information.
37
38       image  Specifies the image
39
40

DESCRIPTION

42   XpmCreateDataFromImage
43       In some cases, one may want to create an XPM data from an XImage, to do
44       so use XpmCreateDataFromImage().  The XpmCreateDataFromImage() function
45       exactly works as XpmWriteFileFromImage(3) does  and  returns  the  same
46       way.   It  just writes to a single block malloc’ed data instead of to a
47       file.  It is the caller’s responsibility to free the data,  using  Xpm‐
48       Free(3) when finished.
49
50
51   XpmCreateDataFromPixmap
52       XpmCreateDataFromPixmap()  creates an XPM data from a Pixmap.  The Xpm‐
53       CreateDataFromPixmap() function uses XGetImage(3) to get from the given
54       pixmaps  the  related X images which are passed to XpmCreateDataFromIm‐
55       age().  Then it destroys the  created  images  using  XDestroyImage(3).
56       XpmCreateDataFromPixmap()   returns   the  same  errors  as  XpmCreate‐
57       DataFromImage().
58
59
60   XpmCreateDataFromXpmImage
61       XpmCreateDataFromXpmImage() creates an XPM data from an XpmImage.   The
62       XpmCreateDataFromXpmImage()  function  writes  out the given image to a
63       single block malloc’ed data in XPM  format.   If  insufficient  working
64       storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on
65       success.  If the passed XpmInfo structure pointer is not NULL,  XpmCre‐
66       ateDataFromXpmImage()  looks  for  the  following attributes: XpmExten‐
67       sions, and XpmHotspot, and writes the related information out as  well.
68       It  is  the  caller’s responsibility to free the data, using XpmFree(3)
69       when finished.
70
71

SEE ALSO

73       XpmFree(3), XpmWriteFileFromImage(3)
74
75
76
77X Version 11                     libXpm 3.5.17                XpmCreateData(3)
Impressum