07-13-2025, 04:17 AM
hi, i am using qb64 pe... I am trying to change a pallete color of one pixel to another (copy a pixel using point(x,y)
i have a screen mode of (512,256 in 32) screen
screen _newimage (512,256,32)
// old point
a=point (oldx,oldy)
// new color
b=point (newx,newy)
_palletcolor a,b
i am reading the pallet color from a palette image i made with colors... it is a pop up so i click the old color. window pops up. i click the new color from pallet and it changes to new color
help please. i is only changing to blue....
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IF E = -1 THEN
PA! = POINT(_MOUSEX, _MOUSEY)
_PUTIMAGE (104, 80), GPALETTE,: _DISPLAY
DO
A = _MOUSEINPUT
IF _MOUSEBUTTON(1) = -1 THEN PB! = POINT(_MOUSEX, _MOUSEY): _PALETTECOLOR PA!, PB!: _DISPLAY: EXIT DO
LOCATE 1, 1: PRINT _MOUSEX, _MOUSEY, A: _DISPLAY
LOOP
END IF
i have a screen mode of (512,256 in 32) screen
screen _newimage (512,256,32)
// old point
a=point (oldx,oldy)
// new color
b=point (newx,newy)
_palletcolor a,b
i am reading the pallet color from a palette image i made with colors... it is a pop up so i click the old color. window pops up. i click the new color from pallet and it changes to new color
help please. i is only changing to blue....
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IF E = -1 THEN
PA! = POINT(_MOUSEX, _MOUSEY)
_PUTIMAGE (104, 80), GPALETTE,: _DISPLAY
DO
A = _MOUSEINPUT
IF _MOUSEBUTTON(1) = -1 THEN PB! = POINT(_MOUSEX, _MOUSEY): _PALETTECOLOR PA!, PB!: _DISPLAY: EXIT DO
LOCATE 1, 1: PRINT _MOUSEX, _MOUSEY, A: _DISPLAY
LOOP
END IF

