JWM Source Documentation
Data Structures | Typedefs | Functions
image.h File Reference

Functions to load images. More...

Go to the source code of this file.

Data Structures

struct  ImageNode
 Structure to represent an image. More...


typedef struct ImageNode ImageNode
 Structure to represent an image.


ImageNodeLoadImage (const char *fileName, int width, int height, char preserveAspect)
 Load an image from a file.
ImageNodeLoadImageFromDrawable (Drawable pmap, Pixmap mask)
 Load an image from a Drawable.
ImageNodeCreateImage (unsigned int width, unsigned int height, char bitmap)
 Create an image node.
void DestroyImage (ImageNode *image)
 Destroy an image node.

Detailed Description

Functions to load images.

Joe Wingbermuehle

Definition in file image.h.

Typedef Documentation

typedef struct ImageNode ImageNode

Structure to represent an image.

Function Documentation

ImageNode* CreateImage ( unsigned int  width,
unsigned int  height,
char  bitmap 

Create an image node.

widthThe image width.
heightThe image height.
bitmap1 if a bitmap, 0 otherwise.
A newly allocated image node.
void DestroyImage ( ImageNode image)

Destroy an image node.

imageThe image to destroy.

Definition at line 623 of file image.c.

References ImageNode::data, ImageNode::next, and Release.

Referenced by DoDestroyIcon(), GetScaledIcon(), LoadNamedIcon(), LoadNamedIconHelper(), and LoadPNGImage().

ImageNode* LoadImage ( const char *  fileName,
int  width,
int  height,
char  preserveAspect 

Load an image from a file.

fileNameThe file containing the image.
widthThe preferred width.
heightThe preferred height.
preserveAspectSet to preserve image aspect when scaling.
A new image node (NULL if the image could not be loaded).

Definition at line 67 of file image.c.

References JUNLIKELY, LoadPNGImage(), LoadXPMImage(), and StrCmpNoCase().

Referenced by GetBestImage(), LoadNamedIcon(), and LoadNamedIconHelper().

ImageNode* LoadImageFromDrawable ( Drawable  pmap,
Pixmap  mask 

Load an image from a Drawable.

pmapThe drawable.
maskThe mask (may be None).
a new image node (NULL if there were errors).

Definition at line 146 of file image.c.

References CreateImageFromXImages(), display, IconNode::height, JXDestroyImage, JXGetGeometry, JXGetImage, and IconNode::width.

Referenced by CreateIconFromDrawable().

joewing.net / Projects / JWM