Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

djImage Class Reference

#include <djimage.h>

List of all members.

Public Methods

 djImage ()
 Constructor.

 djImage (int iWidth, int iHeight, int ibpp)
 Constructor.

 ~djImage ()
 Destructor.

int CalculatePixelWidth (int ibpp)
void CreateImage (int x, int y, int ibpp, int ipitch=-1)
 Create a blank image of give size, bit depth and ipitch.

djColor GetPixelColor (int x, int y)
int GetPixel (int x, int y)
void PutPixel (int x, int y, unsigned int pixel)
unsigned char* Data ()
 Return a pointer to the image data.

int Height () const
 height in pixels.

int Width () const
 width in pixels.

int Pitch () const
 total width in bytes.

int BPP () const
 bits per pixel.

int Load (const char *szFilename)
 Load an image from disk. Only TGA (24/32-bit) filetype is supported.

int LoadTGA (const char *szFilename)
int LoadSPR (const char *szFilename)
int Save (const char *szFilename, int iWidth, int iHeight, int ibpp)
int SaveRAW (const char *szFilename)

Protected Attributes

unsigned char* m_pData
int m_iWidth
int m_iHeight
int m_ibpp
int m_ipixwidth
int m_ipitch


Detailed Description

Generic image loading/manipulation class. Currently only loads TGA's.


The documentation for this class was generated from the following file:

http://www.scorpioncity.com/djgame.html
Copyright (C) David Joffe. Generated: 23 Sep 2001