Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want to change colors in a bitmap file
Message
De
11/10/1999 03:19:22
 
 
À
11/10/1999 01:15:54
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00274721
Message ID:
00274840
Vues:
29
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform