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

FreeBSD Manual Pages

  
 
  

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

NAME
     XpmCreateXpmImage - create an Xpm image

SYNOPSIS
     int XpmCreateXpmImageFromData(char **data, XpmImage *image,
	    XpmInfo *info);

     int XpmCreateXpmImageFromBuffer(char *buffer, XpmImage *image,
	    XpmInfo *info);

     int XpmCreateXpmImageFromImage(Display *display,
	    XImage *image, XImage *shapeimage,
	    XpmImage *xpmimage, XpmAttributes *attributes);

     int XpmCreateXpmImageFromPixmap(Display *display,
	    Pixmap *pixmap, Pixmap *shapemask,
	    XpmImage *xpmimage, XpmAttributes *attributes);

ARGUMENTS
     data      Specifies the location of the data.

     image     Specifies the image structure location.

     info      Specifies  the  location of an XpmInfo structure to get and store
	       information (or NULL).

     display   Specifies the connection to the X server.

     image     Specifies the X image used as the source.

     shapeimageSpecifies the shape mask image, if any.

     xpmimage  Specifies the XPM image which is created.

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

DESCRIPTION
   XpmCreateXpmImageFromBuffer
     To  create  an  XpmImage  from  an  XPM  buffer, use XpmCreateXpmImageFrom-
     Buffer().	 The  XpmCreateXpmImageFromBuffer()  function  reads  the  given
     buffer  to  fill  in  the given XpmImage structure.  If the buffer does not
     contain valid XPM data, it returns XpmFileInvalid.  If insufficient working
     storage is allocated, it returns XpmNoMemory.  On success it  returns  Xpm-
     Success.  If the passed XpmInfo structure pointer is not NULL, XpmCreateXp-
     mImageFromBuffer()  looks	for  the following attributes: XpmReturnComments
     and XpmReturnExtensions, and sets possibly the  XpmHotspot  attribute  when
     returning.  As specified in the table (page 28), if the data related to the
     attributes  XpmReturnComments and XpmReturnExtensions cannot be returned as
     requested because of insufficient	memory	storage,  XpmCreateXpmImageFrom-
     Buffer()  will  change  the  valuemask to mention this and will try to con-
     tinue.  So the caller should check on this before accessing requested data.

     Note: The valuemask of the passed XpmInfo structure must  be  set	to  some
     valid value, at least zero, otherwise unpredictable errors can occur.

   XpmCreateXpmImageFromData
     To  create  an  XpmImage from an XPM data, use XpmCreateXpmImageFromData().
     XpmCreateXpmImageFromData() fills in the given XpmImage structure from  the
     given  data.   If the data does not contain valid XPM data, it returns Xpm-
     FileInvalid.  If insufficient working storage is allocated, it returns Xpm-
     NoMemory.	On success it returns XpmSuccess.  If the passed XpmInfo  struc-
     ture pointer is not NULL, XpmCreateXpmImageFromData() looks for the follow-
     ing  attributes:  XpmReturnExtensions, and sets possibly the XpmHotspot at-
     tribute when returning.  As specified in the table (page 28), if  the  data
     related  to  the  attribute  XpmReturnExtensions  cannot be returned as re-
     quested because of insufficient memory storage, XpmCreateXpmImageFromData()
     will change the valuemask to mention this and will try to continue.  So the
     caller should check on this before accessing requested data.

     Note: The valuemask of the passed XpmInfo structure must  be  set	to  some
     valid value, at least zero, otherwise unpredictable errors can occur.

   XpmCreateXpmImageFromImage
     To  create  an  XpmImage  from an XImage, use XpmCreateXpmImageFromImage().
     From the given X images and XpmAttributes if not  NULL,  XpmCreateXpmImage-
     FromImage()  creates  an XpmImage following the same mechanism as XpmWrite-
     FileFromImage(3).

   XpmCreateXpmImageFromPixmap
     To create an XpmImage from  a  Pixmap,  use  XpmCreateXpmImageFromPixmap().
     From  the	given  pixmaps and XpmAttributes if not NULL, XpmCreateXpmImage-
     FromPixmap() gets the related XImages by calling XGetImage, then  it  gives
     them  to  XpmCreateXpmImageFromImage()  to  create an XpmImage which is re-
     turned to xpmimage.  Finally it destroys the created X  images  using  XDe-
     stroyImage(3).

SEE ALSO
     XpmFreeXpmImage(3), XpmReadFileToBuffer(3), XpmReadFileToData(3),
     XpmReadFileToImage(3), XpmReadFileToPixmap(3), XpmWriteFileFromImage(3)

X Version 11			  libXpm 3.5.19 	    XpmCreateXpmImage(3)

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

home | help