Problems with change PALETTE
Posted: Mon Feb 14, 2005 9:53 am
Hi All,
may somebody can help me.
I don't know how to change PALETTE colors on SCREEN 12.
I have always the standard 16 colors.
My routine to load a BMP File ist very fast but only with standard Colors
PALETTE 1, mycolor doesnt works realy.
Dateikopf$ = SPACE$(54)
SCREEN 12
OPEN "test.bmp" FOR BINARY AS #2
GET #2, 1, Dateikopf$
BildBreite = CVL(MID$(Dateikopf$, 19, 4))
BildHoehe = CVL(MID$(Dateikopf$, 23, 4))
SEEK #2, CVL(MID$(Dateikopf$, 11, 4)) + 1
Daten$ = SPACE$(BildBreite / 2)
Laenge = (BildBreite \ 2) - 1
FOR Y = (BildHoehe - 1) TO 0 STEP -1
GET #2, , Daten$
FOR X = 0 TO Laenge
byte = ASC(MID$(Daten$, X + 1, 1))
PSET (X * 2, Y), byte \ 16
PSET (X * 2 + 1, Y), byte AND 15
NEXT
NEXT
CLOSE #2
may somebody can help me.
I don't know how to change PALETTE colors on SCREEN 12.
I have always the standard 16 colors.
My routine to load a BMP File ist very fast but only with standard Colors
PALETTE 1, mycolor doesnt works realy.
Dateikopf$ = SPACE$(54)
SCREEN 12
OPEN "test.bmp" FOR BINARY AS #2
GET #2, 1, Dateikopf$
BildBreite = CVL(MID$(Dateikopf$, 19, 4))
BildHoehe = CVL(MID$(Dateikopf$, 23, 4))
SEEK #2, CVL(MID$(Dateikopf$, 11, 4)) + 1
Daten$ = SPACE$(BildBreite / 2)
Laenge = (BildBreite \ 2) - 1
FOR Y = (BildHoehe - 1) TO 0 STEP -1
GET #2, , Daten$
FOR X = 0 TO Laenge
byte = ASC(MID$(Daten$, X + 1, 1))
PSET (X * 2, Y), byte \ 16
PSET (X * 2 + 1, Y), byte AND 15
NEXT
NEXT
CLOSE #2