IND_Image Class Reference
[IND_Image]

List of all members.

Public Member Functions

bool Clear (byte pR, byte pG, byte pB, byte pA)
bool GetPixel (int pX, int pY, byte *pR, byte *pG, byte *pB, byte *pA)
bool PutPixel (int pX, int pY, byte pR, byte pG, byte pB, byte pA)
bool FlipH ()
bool FlipV ()
bool Convert (IND_Format pFormat)
bool SetAlpha (byte pR, byte pG, byte pB)
bool PasteImage (IND_Image *pIm, int pX, int pY)
bool GaussianBlur (int pIter)
bool Contrast (float pCont)
bool Equalize ()
bool SetGamma (float pGamma)
bool Negative ()
bool Noisify (float pNoise)
bool Pixelize (int pPixSize)
bool Sharpen (float pFactor, int pIter)
bool Scale (int pSizeX, int pSizeY)
bool EdgeDetect1 ()
bool EdgeDetect2 ()
bool Emboss ()
bool Rotate (float pAngle)
bool InvertAlpha ()
bool Saturation (float pSaturation)
int IsImageLoaded ()
 This function returns the width in pixels of the image.
int GetWidth ()
 This function returns the width in pixels of the image.
int GetHeight ()
 This function returns the height in pixels of the image.
int GetBpp ()
 This function returns the bytes per pixel of the image.
int GetFormatInt ()
 This function returns the image format in an integer. See IND_Format.
char * GetExtension ()
 This function returns the extension that had the image when it was stored in a file. For example if the image was "loover.jpg" the function will return "jpg".
byte * GetPointer ()
 This function returns the pointer to the memory bytes which forms the image. It is a function very useful for accessing to the image directy and for modifying it or readindg it.
char * GetName ()
 This function returns the name to the image in a string of chars.

Friends

class IND_ImageManager


Detailed Description

IND_Image is an image object from the class IND_ImageManager. Read the explanation in IND_ImageManager for having more details.

Member Function Documentation

bool IND_Image::Clear ( byte  pR,
byte  pG,
byte  pB,
byte  pA 
)

Parameters:

Operation:

Clear the image to the chosen colour. Returns 0 if there is no image loaded.

bool IND_Image::GetPixel ( int  pX,
int  pY,
byte *  pR,
byte *  pG,
byte *  pB,
byte *  pA 
)

Parameters:

Operation:

Returns by reference the colour of the specified pixel (in RGBA). Returns 0 if there is no image loaded.

If the image format (see IND_Format) doesn't have alpha value (pA) this parameter can be omitted.

In the special case of IND_LUMINANCE type images, the pixel colour will be returned in pA.

bool IND_Image::PutPixel ( int  pX,
int  pY,
byte  pR,
byte  pG,
byte  pB,
byte  pA 
)

Parameters:

Operation:

Puts a pixel in the position and colour specified as parameters (in RGBA). Returns 0 if there is no image loaded.

If the image format (see IND_Format) doesn't have alpha value (pA) this parameter can be omitted.

In the special case of IND_LUMINANCE type images, the pixel colour must be specified in pA.

bool IND_Image::FlipH (  ) 

Parameters:

Operation:

Horizontal inversion. Returns 0 if there is no image loaded.

original.png

Original

fliph.png

Horizontal mirror

bool IND_Image::FlipV (  ) 

Parameters:

Operation:

Vertical inversion. Returns 0 if there is no image loaded.

original.png

Original

fliph.png

Vertical mirror

bool IND_Image::Convert ( IND_Format  pFormat  ) 

Parameters:

Operation:

Converts the image to the specified format. Returns 0 if there is no image loaded.

bool IND_Image::SetAlpha ( byte  pR,
byte  pG,
byte  pB 
)

Parameters:

Operation:

Puts the alpha value of all pixels of the specified color into transparent. This is know as "color key". Returns 0 if there is no image loaded.

bool IND_Image::PasteImage ( IND_Image pIm,
int  pX,
int  pY 
)

Parameters:

Operation:

Pastes the image passed as parameter over the image that calls the method in the specified position. Returns 0 if there is no image loaded.

bool IND_Image::GaussianBlur ( int  pIter  ) 

Parameters:

Operation:

Applies a gaussian filter which intensity depends on the pIter parameter. Returns 0 if there is no image loaded.

original.png

Original

gauss.png

Gaussian blur

bool IND_Image::Contrast ( float  pCont  ) 

Parameters:

Operation:

Applies a contrast filter which intensity depends of the pCont parameter. Returns 0 if there is no image loaded.

original.png

Original

cont.png

Contrast

bool IND_Image::Equalize (  ) 

Parameters:

Operation:

Applies a equalizator filter. Returns 0 if there is no image loaded.

original.png

Original

equa.png

Equalizator

bool IND_Image::SetGamma ( float  pGamma  ) 

Parameters:

Operation:

Applies a gamma filter which intensity depends on the pGamma parameter. Values lower than 1 makes the image darker, and values greater than 1 makes it clearer. Returns 0 if there is no image loaded.

original.png

Original

gamma.png

Gamma

bool IND_Image::Negative (  ) 

Parameters:

Operation:

Applies a negative filter. Returns 0 if there is no image loaded.

original.png

Original

negat.png

Negative

bool IND_Image::Noisify ( float  pNoise  ) 

Parameters:

Operation:

Applies a noise filter which intensity depends on the pNoise parameter. The greater this value is, the more noise is applied to the image. Returns 0 if there is no image loaded.

original.png

Original

noise.png

Noise

bool IND_Image::Pixelize ( int  pPixSize  ) 

Parameters:

Operation:

Applies a pixelation filter. The size of each pixel is specified by the parameter pPixSize. Returns 0 if there is no image loaded.

original.png

Original

pixel.png

Pixeled

bool IND_Image::Sharpen ( float  pFactor,
int  pIter 
)

Parameters:

Operation:

Applies a definition filter that depends of the parameters pFactor (the greater this parameter, the more "defined" the image will be) and the pIter parameter that indicates the number of times that the filter is applied consecutivity. This filter can improve the quality in images that have been deteriorated. Returns 0 if there is no image loaded.

original.png

Original

shar.png

Sharpen

bool IND_Image::Scale ( int  pSizeX,
int  pSizeY 
)

Parameters:

Operation:

Applies a scale to the height and width specified as paramteres. Returns 0 if there is no image loaded.

original.png

Original

scale.png

Scaled

bool IND_Image::EdgeDetect1 (  ) 

Parameters:

Operation:

Applies a filter of border detection (type 1). Returns 0 if there is no image loaded.

original.png

Original

edge1.png

Border detection type 1

bool IND_Image::EdgeDetect2 (  ) 

Parameters:

Operation:

Applies a filter of border detection (type 2). Returns 0 if there is no image loaded.

original.png

Original

edge2.png

Border detection type 2

bool IND_Image::Emboss (  ) 

Parameters:

Operation:

Applies a emboss filter. Returns 0 if there is no image loaded.

original.png

Original

emboss.png

Emboss

bool IND_Image::Rotate ( float  pAngle  ) 

Parameters:

Operation:

Applies a rotation in an angle which is specified as the pAngle parameter. Returns 0 if there is no image loaded.

original.png

Original

rotate.png

Rotation

bool IND_Image::InvertAlpha (  ) 

Parameters:

Operation:

Inverts the alpha values (transparency) of the image. Returns 0 if there is no image loaded.

bool IND_Image::Saturation ( float  pSaturation  ) 

Parameters:

Operation:

Applies a saturation filter which depends of the paramenter pSaturation. The greater this value is, the more saturated the image will be. Returns 0 if there is no image loaded.

original.png

Original

satur.png

Saturation


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 17:16:47 2009 for IndieLib by  doxygen 1.5.4