MImgGetPixelColor

Functions ››
Parent Previous Next

nColor = MImgGetPixelColor( hImage, nX, nY )

Gets the color of an image's pixel.

Parameters
hImage
Number: Handle of the image

nX, nY
Number: X,Y coordinate

Return
Number: The pixel color or MIMG_COLOR_UNDEF if an error occurs

Example
In this example the color of the top left pixel of an image is determined and set as transparent color:

Set nColor = MImgGetPixelColor( hImage, 0, 0 )
If nColor != MIMG_COLOR_UNDEF
 Call MImgSetTranspColor( hImage, nColor )

See also
MImgGetPaletteColor
MImgGetPixelOpacity
MImgGetUsedColors
MImgSetPixelColor

Created with the Personal Edition of HelpNDoc: News and information about help authoring tools and software