Posted: 17th Dec 2020 3:14
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

+ Code Snippet
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?
Posted: 17th Dec 2020 3:44
"


so

+ Code Snippet
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

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



Thanks for the lightning reaction there - i was going to remove it but it turns out i still cant post on codebase .. i'll check later

(thanks again)

(tis to say i am not really a shiney person or john the communicator so i was just gonna post it on codebase and run ... in essence , effectively)
Posted: 17th Dec 2020 5:03
posting the same thing twice and naming a thread "blabla..." doesn't help your post-moderation state, but general netiquette might.

no need to be "shiney" but no need to make a mess of things, either.
Posted: 18th Dec 2020 9:54
Thanks for sharing. Some blur filters would be cool too if they haven't already been created by the community. A gussian blur might be a cool affect to add to a paused game, with a dialog/window on top waiting for the user to continue i.e. take an image of the game screen, blur it and then paste it on top of the game, but below the dialog/window.

This is what I mean

Posted: 23rd Aug 2021 0:07
no email notifications, this must be y o

but :

https://forum.thegamecreators.com/thread/216503 (blur)

the double post was very likely by accident, thanks for the course in netiquette, thats always helpful