Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XpmCreateBuffer(3)		libXpm functions	      XpmCreateBuffer(3)

NAME
     XpmCreateBuffer - create an XPM Buffer

SYNOPSIS
     int XpmCreateBufferFromImage(Display *display , char **buffer_return,
	    XImage *image, XImage *shapeimage, XpmAttributes *attributes);

     int XpmCreateBufferFromPixmap(Display *display, char **buffer_return,
	    Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes);

     int XpmCreateBufferFromXpmImage(char **buffer_return, XpmImage *image,
	    XpmInfo *info);

ARGUMENTS
     display   Specifies the connection to the X server.

     buffer_return
	       Returns the buffer which is created.

     image     Specifies the image.

     shapeimageSpecifies the shape mask image.

     attributesSpecifies  the location of a structure containing information (or
	       NULL).

     info      Specifies the location of a structure to get possible information
	       (or NULL).

DESCRIPTION
   XpmCreateBufferFromPixmap
     XpmCreateBufferFromPixmap() creates an XPM buffer from a Pixmap.  The  Xpm-
     CreateBufferFromPixmap()  function  works	as XpmWriteFileFromPixmap(3), it
     just calls XpmCreateBufferFromImage() instead of  XpmWriteFileFromImage(3).
     Once  again,  the	caller should free the buffer using XpmFree(3) when fin-
     ished.

     As a convenience, the XpmReadFileToBuffer(3) and  XpmWriteFileFromBuffer(3)
     functions	are provided to copy a file to a buffer and to write a file from
     a buffer.	Thus  for  instance  one  may  decide  to  use	XpmCreateBuffer-
     FromPixmap(),   XpmWriteFileFromBuffer(3),   and	XpmFree(3)   instead  of
     XpmWriteFileFromPixmap(3).  On some systems this may lead to a  performance
     improvement,  since the processing will be performed in memory, but it uses
     more memory.

   XpmCreateBufferFromImage
     The XpmCreateBufferFromImage() function works as  XpmWriteFileFromImage(3),
     it  just  writes  to  a  mallocaed buffer instead of to a file.  The caller
     should free the buffer using XpmFree(3) when finished.

   XpmCreateBufferFromXpmImage.
     To create an XPM buffer from  an  XpmImage,  use  XpmCreateBufferFromXpmIm-
     age().  The XpmCreateBufferFromXpmImage() function writes out the given im-
     age  to  a  single  block	mallocaed buffer in XPM format.  If insufficient
     working storage is allocated, it returns XpmNoMemory, and	returns  XpmSuc-
     cess on success.  If the passed XpmInfo structure pointer is not NULL, Xpm-
     CreateBufferFromXpmImage() looks for the following attributes: XpmComments,
     XpmExtensions,  and  XpmHotspot,  and writes the related information out as
     well.  The caller should free the buffer using XpmFree(3) when finished.

SEE ALSO
     XpmFree(3), XpmWriteFileFromBuffer(3), XpmWriteFileFromImage(3),
     XpmWriteFileFromPixmap(3)

X Version 11			  libXpm 3.5.19 	      XpmCreateBuffer(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XpmCreateBuffer&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help