from what i saw here :
https://www.thegamecreators.com/codebase/view/3e4aee06536f45588a059759aafa219f - i quickly understood this was not AppGameKit (classic 2020 11 16) for some reason but when i try to add it to codebase this thing nags about post approval (its been a month or so since i asked a question somewhere .. i guess im not approvable then)
so here it is .. maybe if i get approvable ill bother posting it to codebase
you're welcome
function imgfilter(img,filter)
grey_base = 1
grey_channeldep = 2
photonegative = 3
block = CreateMemblockFromImage(img)
width = GetMemblockInt(block,0)
height = GetMemblockInt(block,4)
size = GetMemblockSize(block)
for lus = 12 to size-1 step 4
r = GetMemblockByte(block,lus)
g = GetMemblockByte(block,lus+1)
b = GetMemblockByte(block,lus+2)
b = GetMemblockByte(block,lus+3)
//nothing in this code seems to be left that was 'altered from' maybe ill post it
//awh umm
//this outs something more like blue filter
/*
SetMemblockByte(block,lus,r*0.3)
SetMemblockByte(block,lus,r*0.3)
SetMemblockByte(block,lus,r*0.3)
SetMemblockByte(block,lus,r*0.3)
*/
//greenish ..
/*
SetMemblockByte(block,lus,r*0.3)
SetMemblockByte(block,lus+1,g*0.59)
SetMemblockByte(block,lus+2,b*0.11)
//alpha untouched
//SetMemblockByte(block,lus+3,a)
*/
/*
//cute !!! photo inverse fx
SetMemblockByte(block,lus,255-r)
SetMemblockByte(block,lus+1,255-g)
SetMemblockByte(block,lus+2,255-b)
//alpha untouched
//SetMemblockByte(block,lus+3,a)
*/
select filter
//yah, avg ... CUTEness !!
case grey_base
// base
avg = (r+g+b)/3
SetMemblockByte(block,lus,avg)
SetMemblockByte(block,lus+1,avg)
SetMemblockByte(block,lus+2,avg)
endcase
case grey_channeldep
//channel dependent luminance perception
//http://kdnuggets.com/2019/12/convert-rgb-image-grayscale
avg=(r*0.2126+g*0.7152+b*0.0722)/3
SetMemblockByte(block,lus,avg)
SetMemblockByte(block,lus+1,avg)
SetMemblockByte(block,lus+2,avg)
endcase
case photonegative
//cute !!! photo inverse fx
SetMemblockByte(block,lus,255-r)
SetMemblockByte(block,lus+1,255-g)
SetMemblockByte(block,lus+2,255-b)
//alpha untouched
//SetMemblockByte(block,lus+3,a)
endcase
endselect
next lus
img_out = CreateImageFromMemblock(block)
endfunction img_out
MOD EDIT:
From what i can see your post was approved
That's 2 post being approved....things are looking up huh?