there are no direct image access. please correct me if i wrote wrong.
you can made a memblock from image, change a r,g,b,a (4 bytes) value and
make a image again. i think its not for realtime and not a direct access but usefuly for other things.
the memblock have a header with image size etc.
the functions in beta now:
CreateImageFromMemblock
CreateMemblock
CreateMemblockFromImage
DeleteMemblock
GetMemblockByte
GetMemblockExists
GetMemblockFloat
GetMemblockInt
GetMemblockShort
GetMemblockSize
SetMemblockByte
SetMemblockFloat
SetMemblockInt
SetMemblockShort
remstart
function SpecialImage(img,r2,g2,b2)
ImageWidth#=getimagewidth(img)
ImageHeight#=getimageheight(img)
memBlockID=creatememblockfromimage(img)
x=0
y=0
for x=0 to ImageWidth#-1
for y=0 to ImageHeight#-1
// Finding The offset of a x,y pixel (The first 12 Bytes (3*4) are the headers : Width/Height/ColorDepth)
offsetPix=12+((x+(y*ImageWidth#))*4)
// RGBA values :
r1=GetMemblockByte(memBlockID,offsetPix+0)
g1=GetMemblockByte(memBlockID,offsetPix+1)
b1=GetMemblockByte(memBlockID,offsetPix+2)
a1=GetMemblockByte(memBlockID,offsetPix+3)
//r2=128
//g2=0
//b2=0
a2=192
if (x>ImageWidth#*0.02 and x<ImageWidth#*0.95) and (y>ImageHeight#*0.15 and y<ImageHeight#*0.8) and a1<255
r3=(r2+r1)/2//-a1
g3=(g2+g1)/2//-a1
b3=(b2+b1)/2//-a1
a3=(a2+a1)
if r3<0 then r3=0
if g3<0 then g3=0
if b3<0 then b3=0
if r3>255 then r3=255
if g3>255 then g3=255
if b3>255 then b3=255
if a3>255 then a3=255
elseif (x>ImageWidth#*0.02 and x<ImageWidth#*0.95) and (y>ImageHeight#*0.15 and y<ImageHeight#*0.8) and a1=255
//Volle Farbe mischen
r3=(255+r2)/2
g3=(255+g2)/2
b3=(255+b2)/2
a3=255
else
//Meine Farbe aber Alpha beibehalten!
r3=r2
g3=g2
b3=b2
a3=a1
endif
setMemblockByte(memBlockID,offsetPix+0,r3)
setMemblockByte(memBlockID,offsetPix+1,g3)
setMemblockByte(memBlockID,offsetPix+2,b3)
setMemblockByte(memBlockID,offsetPix+3,a3)
next
next
createimagefrommemblock(img,memBlockID)
deletememblock(memBlockID)
endfunction
remend