Syntax : HMG_GetImageInfo ( [ cFileName | hBitmap ], @nWidth, @nHeight, @aBackColor, [ nRowColor ], [ nColColor ] ) --> return lBoolean
Intruduced with : HMG 3.2 (Stable) 2013/12/08
See first : C:\hmg.3.3.1\SAMPLES\Miscellaneous\ScreenSplash\ScreenSplash.prg
Thanks to Dr. Soto
Code: Select all
/*
HMG_GetImageInfo()
Get Information an Image
HMG_GetImageInfo ( [ cFileName | hBitmap ], @nWidth, @nHeight, @aBackColor, [ nRowColor ], [ nColColor ] ) --> return lBoolean
Intruduced with : HMG 3.2 (Stable) 2013/12/08
See first : C:\hmg.3.3.1\SAMPLES\Miscellaneous\ScreenSplash\ScreenSplash.prg
Thanks to Dr. Soto
*/
#include <hmg.ch>
PROCEDURE Main()
LOCAL cMessage := ImageInfoVerbose( "BosTaurus_logo.bmp" ) // be sure that this file exist !
IF HB_ISNIL( cMessage )
MsgStop( "Couldn't get image info !", "Error !" )
ELSE
MsgBox( cMessage, "Image Info" )
ENDIF
RETURN // ImageInfoSample.Main()
*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.
FUNCTION ImageInfoVerbose( cIMageFName )
LOCAL xRVal, nWidth, nHeight, aBackColor
IF FILE( cIMageFName )
IF HMG_GetImageInfo ( cIMageFName, @nWidth, @nHeight, @aBackColor )
xRVal := cIMageFName + " image info :" + CRLF + CRLF +;
"Width : " + NTOC( nWidth ) + CRLF +;
"Height : " + NTOC( nHeight ) + CRLF +;
"Back Color : " + HB_ValToExp( aBackColor )
ELSE
MsgStop( "Couldn't obtained Image Info.", "Error" )
ENDIF
ELSE
MsgStop( cIMageFName + " file not found !", "ERROR" )
ENDIF
RETURN xRVal // ImageInfoVerbose()
*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.