GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XpmCreateBuffer(3) libXpm functions XpmCreateBuffer(3)

XpmCreateBuffer - create an XPM Buffer

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);

Specifies the connection to the X server.
Returns the buffer which is created.
Specifies the image.
Specifies the shape mask image.
Specifies the location of a structure containing information (or NULL).
Specifies the location of a structure to get possible information (or NULL).

XpmCreateBufferFromPixmap() creates an XPM buffer from a Pixmap. The XpmCreateBufferFromPixmap() 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 finished.

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 XpmCreateBufferFromPixmap(), 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.

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

To create an XPM buffer from an XpmImage, use XpmCreateBufferFromXpmImage(). The XpmCreateBufferFromXpmImage() function writes out the given image to a single block malloc’ed buffer in XPM format. If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. If the passed XpmInfo structure pointer is not NULL, XpmCreateBufferFromXpmImage() 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.

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

libXpm 3.5.17 X Version 11

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.