under Xbase++ i have this Code
Code: Select all
FUNCTION BMP2BMP( oBMP, aXbpSize )
LOCAL oHuge, oTiny, oPS, oRet, nBits, nPlanes
IF aXbpSize[ 2 ] > 0
oHuge := oBMP
nBits := oBMP:bits
nPlanes := oBMP:planes
oPS := XBPPRESSPACE() :new() :Create() // Xbase++ Style
//Create a new empty bitmap
oTiny := XBPBITMAP() :New() :Create()
oTiny:Make( aXbpSize[ 1 ], aXbpSize[ 2 ], nPlanes, nBits )
oTiny:presSpace( oPS ) // Xbase++ Style
//Copie and resize the huge bitmap to the small bitmap
oHuge:Draw( oPS, { 0, 0, aXbpSize[ 1 ], aXbpSize[ 2 ] },,, 4 )
oRet := oTiny
ELSE
oRet := oBMP
ENDIF
RETURN oRetthan a "Draw" old Bildmap into new Bitmap
how to do it with harbour HMG