General information
Category:
Pictures and Image processing
HI!
Are you saying you want to change a bitmap that is
all 1 color for use in a button on reports for example:
Maybe this function will help
FUNCTION UpdateRGBColor
LPARAMETERS lUpdateAll
LOCAL nFileHandle, nCurRec, LUPDATE
LUPDATE = .T.
=OpenDBF("intcolor")
nCurRec = RECNO()
IF lUpdateAll
GO TOP
ENDIF
DO WHILE NOT EOF() AND LUPDATE
LUPDATE = lUpdateAll
nFileHandle = FCREATE('color.bmp')
FWRITE(nFileHandle,CHR(66)+CHR(77)+CHR(60)+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(00);
+CHR(00)+CHR(00)+CHR(54)+CHR(00)+CHR(00)+CHR(00)+CHR(40)+CHR(00);
+CHR(00)+CHR(00)+CHR(01)+CHR(00)+CHR(00)+CHR(00)+CHR(01)+CHR(00)+CHR(00)+CHR(00)+CHR(01);
+CHR(00)+CHR(24)+CHR(00)+CHR(00)+CHR(00);
+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(98)+CHR(05)+CHR(00)+CHR(00)+CHR(98);
+CHR(05)+CHR(00)+CHR(00)+CHR(00)+CHR(00);
+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(00)+CHR(00);
+CHR(IIF(ISNULL(IntColor.Blue),0,IntColor.Blue*2.55))+CHR(IIF(ISNULL(IntColor.green),0,IntColor.green*2.55))+CHR(IIF(ISNULL(IntColor.red),0,IntColor.red*2.55));
+CHR(00)+CHR(00)+CHR(00))
FCLOSE(nFileHandle)
APPEND GENERAL RGBPict FROM COLOR.BMP
=TblCommit()
IF lUpdateAll
SKIP 1
ENDIF
ENDDO
IF lUpdateAll
GO nCurRec
ENDIF
DELETE FILE COLOR.BMP
RETURN
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only