Image handling


MAllocImage
Creates an empty MIMAGE object
MReadBMPFile
Creates a MIMAGE object from a Windows BMP file
MIMAGE MReadTIFFFile(const char *fname)
MIMAGE MReadJPEGFile(const char *fname)
MIMAGE MReadGIFFile(const char *fname)
MIMAGE MImageClone(MIMAGE img)
MIMAGE MCreateImageMaskByCMapIndex(MIMAGE img, int index)
MIMAGE MCreateImageMaskByPixel(MIMAGE img, int x, int y)
MIMAGE MCreateImageMaskByRGB(MIMAGE img, int r, int g, int b)
int MWriteTIFFFile(MIMAGE img, const char *name, int compression)
int MWriteBMPFile(MIMAGE img, const char *fname)
int MWriteJPEGFile(MIMAGE img, const char *name, int quality)
void MFreeImage(MIMAGE img)
Frees all resources used by the image, making image 'img' no longer usuable.
MInstallImage
Prepares the image object for drawing
void MUninstallImage(MIMAGE img)
void MImageGetInfo(MIMAGE img, int *pw, int *ph, int *pnplanes)
void MImageGetPixelRGB(MIMAGE img, int x, int y, int *pr, int *pg, int *pb)
void MImageSetPixelRGB(MIMAGE img, int x, int y, int r, int g, int b)
int MImageGetPixelIndex(MIMAGE img, int x, int y)
void MImageSetPixelIndex(MIMAGE img, int x, int y, int i)
void MImageGetCMapEntry(MIMAGE img, int i, int *pr, int *pg, int *pb)
void MImageSetCMapEntry(MIMAGE img, int i, int r, int g, int b)
void MImageSetMask(MIMAGE dst, MIMAGE mask)
void MImageMerge(MIMAGE dst, MIMAGE src, int xo, int yo, int transparent)
void MImageComputeBackgroundRGB(MIMAGE img, int *pr, int *pg, int *pb)
A MIMAGE object stores an image that can be drawn in a DrawArea object or can be set as background for PushButton, RadioButton and ToggleButton objects. Before drawing the image you must Install it, that is: allocate image colors. If your image is not currently displayed in any object and you want to keep it in memory, you can Uninstall it in order to free image colors. This is particularly recommended if you run your application in a colormap based color system (16 or 256 color modes). Installing an image can also cause further resource allocation: under Windows a BITMAP is created, under X-Window a PIXMAP is allocated in the server's memory, under GRX a GrContext is created.

alphabetic index hierarchy of classes


MGUI Copyright 1996-2000 Vincenzo Morello

generated by doc++